코드 실행 상자
6821 단어 코드
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
>
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
vue 단일 페이지에 여러 개의 echarts 도표가 있을 때의 공용 코드 쓰기html에서: 데이터 처리는 말할 필요가 없다.응, 직접 그림을 그려: 공통 섹션: 이 페이지를 떠날 때 파괴: 추가 정보: Vue + Echarts 차트 표시 및 동적 렌더링 준비 작업 echarts 의존 설치 n...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.