Iframe 편집모드 활성화
또는 2004.11.18
- Javascript
- · 2016. 6. 14.
Enabling Rich Text Editing:Given a document, you can add the attribute "designMode" and set it to "on" to get an editable document. For example, in JavaScript, if you have an iframe with an id of 'edit', you can get its contentDocument and set designMode to "on" like this: document.getElementById("edit").contentDocument.designMode="on"; Right now, you can't completely turn off editing by setting..
function trim (strSource) { re = /^\s+|\s+$/g; return strSource.replace(re, ''); } function trim(ment){ var start; var end; for(i=0;i -1; i--){ mentcnt = ment.substring(i,i+1); if (mentcnt != ' ') { end=i; break } } str = ment.substring(start,end+1); if (str == ' ') { str = ''; } return str; } 2004.12.13
//쿠키저장function setCookie(name, value,expire,path) { path = (!path)?"/":path; var todayDate = new Date(); unixtime = todayDate.getTime(); if (value==null) { expire = 0; } if (expire != null) { extime = unixtime+(expire*1000); todayDate.setTime(extime); expiretime = " expires=" + todayDate.toUTCString() +";"; }else{ expiretime = ""; } document.cookie = name + "=" + escape(value) + "; path="+path+"..
또는 2004.11.18
text ... var data = $('li.someclass').metadata(); if ( data.some && data.some == 'data' ) alert('It Worked!'); @Reference http://phpschool.com/gnuboard4/bbs/board.php?bo_table=forum&wr_id=146638&page=3 http://stackoverflow.com/questions/4189036/custom-data-in-xhtml-1-0-strict
요소객체 DOM 속성을 반환,설정 elem.checkedtrue (Boolean) Will change with checkbox state$(elem).prop("checked")true (Boolean) Will change with checkbox stateelem.getAttribute("checked")"checked" (String) Initial state of the checkbox; does not change$(elem).attr("checked")(1.6)"checked" (String) Initial state of the checkbox; does not change$(elem).attr("checked")(1.6.1+)"checked" (String) Will change with..