开发者

textfield with link

as I can get my textfield displays the contents as <a>?

items: [{
开发者_开发百科  xtype: 'textfield',
  value: '<a href="www.google.com"> www.google.com </a>' <--
}]


No, you can not do that with textfield or textarea. If you only want the link, the following works:

                    fieldLabel: 'Attention',
                html: '<a href="http://google.com">xxxxxxxxxxx</a>',


With pure javascript, you can do something like this:

HTML

<label for="txt">Text</label>
<input id="txt" type="text" onclick="url=document.getElementById('txt').value;if (url != ''){window.location=url;}"/>

CSS

input#txt {
    color: blue;
    text-decoration: underline;
}

Find it here

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜