我如何能够在文本领域允许超文本,使用户能够在文本领域和提交时进入超文本,使超文本在浏览器中平分和显示? 现在,在案文领域采用正常形式要素的Im是:
<input id="todo" type="text">
我需要改变什么? <代码> 类型代码>?
我如何能够在文本领域允许超文本,使用户能够在文本领域和提交时进入超文本,使超文本在浏览器中平分和显示? 现在,在案文领域采用正常形式要素的Im是:
<input id="todo" type="text">
我需要改变什么? <代码> 类型代码>?
你不需要做任何事情。 超文本是文本,因此用户如愿意,可将超文本打成正文。
将类型改为html
简而言之,它是一种不为人所知的类型,因此浏览器将其视作<条码>。
如果你接受超文本,那么你在把它重新显示给浏览器之前,就必须谨慎地加以净化,否则,你就会打开。 XSS 安全脆弱性。
If you would like to enable HTML markup in input field, use <textarea id="todo"></textarea>
It will give you a much bigger box.
Optionally you can use TinyMCE which is easy to use and powerful WYSIWYG tool.
But to show the code when submitted you need to know PHP, Python programming language or something like those.
你所期待的是所谓的世界青年协会编辑。 (见你所想的东西)
你们有很多,有些是免费的,只有谷歌“WYSIWYG”编辑,见到 yourself。
I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....
I have a div <div id="masterdiv"> which has several child <div>s. Example: <div id="masterdiv"> <div id="childdiv1" /> <div id="childdiv2" /> <div id="...
I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...
<form><input type="file" name="first" onchange="jsFunction(2);"> <input type="file" name="second" onchange="jsFunction(3);"</form> Possible to pass just numbers to the js ...
So I ve got a menu with a hover/selected state and it loads fine in IE6/IE7. However when I scroll down the page and put the element outside of the viewport and then back in I get a broken image! I ...
I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...
Is it possible to reload a form after file-input change? I have a form where the user can chose an image for upload. I also have a php script which displays that image resized. I only wonder if it ...
I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!