How to make a div with a blinking cursor and editable text without using <input>?

后端 未结 6 1844
既然无缘
既然无缘 2020-12-31 11:34

I need to make a div layer so that when you click on it you will have your cursor there blinking and you can insert/delete text just like

6条回答
  •  隐瞒了意图╮
    2020-12-31 12:07

    contenteditable attribute could be used for this purpose. Following code line has been tested in IE7 and Firefox 3.0.10. One part, I have noticed that this attribute should be used in lower case only; else it wont work in Firefox.

    Enter text here

提交回复
热议问题