开发者

display contents in input

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜