115、新窗口中显示提交内容

115、新窗口中显示提交内容

脚本说明:

把如下代码加入<body>区域中

<script>

var win = null;

function show_choose()

{

       var new_html = '<br><button onclick="window.location=\'about:OK\'">确定</button><button onclick="opener.focus();window.close()">取消</button>'

 

              if(win==null||win.closed)

              {

                     win = window.open("about:blank","choose_window","width=200,height=200,scrolling=yes");

              }

              else

              {

                     win.document.close();                                      

              }    

             

              win.document.write(document.getElementById("the_text").value+new_html);

              win.focus();

}

</script>

<form method="POST" action="javascript:show_choose()">

<input type="text" id="the_text" size="20"><input type="submit" value="提交"><input type="reset" value="全部重写">

</form>

 

Write a comment

Comments: 0