开发者

display contents in input

开发者 https://www.devze.com 2023-02-08 01:13 出处:网络
I have anchor tag and input tag <a href=\"example.com\">Go to Example.com</a> and 开发者_StackOverflow社区&lt;a href=\"example.com\"&gt;Go to Example.com&lt;/a&gt;

I have anchor tag and input tag

<a href="example.com">Go to Example.com</a>

and

开发者_StackOverflow社区&lt;a href="example.com"&gt;Go to Example.com&lt;/a&gt;

Now I need to display above text in input box

<input type="text" value="<a href="example.com">Go to Example.com</a>">

But it's not working, How can I do this?


Change quotes to html entities:

&quot;

<input type="text" value="<a href=&quot;example.com&quot;>Go to Example.com</a>">


<input type="text" value="<a href=&quot;example.com&quot;>Go to Example.com</a>">
0

精彩评论

暂无评论...
验证码 换一张
取 消