asp问题,帮帮忙

来源:百度知道 编辑:UC知道 时间:2024/06/21 02:12:24
我想将在text中填写的内容在一个对话框中显示,点“确认”转下个页面执行,点“取消”回到原来界面。

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>runcode</title>
</head>

<body>
<script language="JavaScript" type="text/JavaScript">
function runEx(cod1) {
cod=document.all(cod1)
var code=cod.value;
if (code!=""){
var newwin=window.open('','','');
newwin.opener = null
newwin.document.write(code);
newwin.document.close();
};
}

</script>
<textarea name="textarea" cols="60" rows="10" id="rn01">
</textarea>
<br><INPUT onclick="runEx('rn01')" type="button" value="运行代码" "style="cursor:hand">
  <input onclick="document.all['rn01'].value=''