코드 실행 상자

6821 단어 코드
//<![CDATA[

function runCode(obj) {
var winname = window.open('', "_blank", '');
winname.document.open('text/html', 'replace');
winname.document.write(obj.value);
winname.document.close();
}
//]]>
여기에 입력할 내용입니다.
 

  
< script type ="text/javascript" > // <![CDATA[

function runCode(obj) {
var winname = window.open( '' , " _blank " , '' );
winname.document.open(
' text/html ' , ' replace ' );
winname.document.write(obj.value);
winname.document.close();
}
// ]]></script>
< p >
< textarea rows = " 10 " id = " code1 " style = " width: 80%; " >

< / textarea><br / >
< input onclick = " runCode(document.getElementById('code1')) " value = " " type = " button " / >< / p >

 

좋은 웹페이지 즐겨찾기