开发者

Making false the readonly of a Div

开发者 https://www.devze.com 2023-01-23 10:52 出处:网络
I am using a multiline textbox for publishing a note but taking the content in a div through inner HTMl.

I am using a multiline textbox for publishing a note but taking the content in a div through inner HTMl. like this

divMessageDescription.InnerHtml = dbreader["Message"开发者_JAVA百科].ToString();

but now for a particular group of people I want to make the read only property of this div as false..

Can I do this ???


Why use div for text editing, you can use multi-line text box (textarea). Even for display purpose, you may use the same textbox with read-only set as true.


To make the div editable (read only = false) you use the contentEditable="true"

<div id="divMessageDescription" contentEditable="true">
             click here to edit ...</div>
0

精彩评论

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