Chen Log

陳洛格

讓DIV可以直接編輯的方法 div click change to textarea edit

leave a comment »

讓DIV可以直接編輯的方法 div click change to textarea edit 

但不是真的編輯,
只是網頁上的暫時修改,
方便網頁上做列印輸出時等變動…

螢幕快照 2014 01 15 21 52 24

點下面 尺寸的文字資料後
 螢幕快照 2014 01 15 21 52 31

變成有框 可以修改說明內容。

語法相當簡單:
就是加上 contenteditable=“true” 

 <div contenteditable=”true”>內容</div>

即可。 

Advertisements

Written by chenagw

2014/01/15 at 21:58

Posted in Uncategorized

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: