在输入框中输入HTML代码,你就可以自动显示页面,用作编辑主页 - 中国WEB开发者网络 (http://www.webasp.net) -- 网页特效 (http://www.webasp.net/javascript/) --- 在输入框中输入HTML代码,你就可以自动显示页面,用作编辑主页 (http://www.webasp.net/javascript/1/718.htm) |
| -- 发布日期: 2005-06-30 |
| <!-- 网页特效代码由[中国WEB开发者网络:http://www.ChinaWebDev.com]提供! --> <!-- 要实现此效果需要 1 个步骤: --> <!-- 第 1 步: --> <!-- 把下面的代码加到<BODY></BODY>区域中: --> <script language="JavaScript"> function trestart(){ if (script) { clear = confirm("你真的确定要关闭吗?",''); if(clear) { document.script.reset(); document.script.value = ""; } } } function test(){ { temp = document.script.tester.value; testwin= open("", "testwin","status=no,menubar=yes,toolbar=no"); testwin.document.open(); testwin.document.write(temp); testwin.document.close(); } } function about(){ alert("HTML代码直接显示出页面来") alert("http://www.chinawebdev.com E-mail:webmaster@chinawebdev.com") } function help(){ OpenWindow=window.open("", "newwin","height=420,width=470,toolbar=no,scrollbars="+scroll+",menubar=no"); OpenWindow.document.write("<body bgcolor='white' text='black' alink='blue'vlink='blue' link='blue'><TITLE>帮助信息</TITLE>") OpenWindow.document.write("<center>你只要把你想显示的代码放到上页的输入框中,你自己也可以写代码,按显示键就能显示你的页面内容</center><br>") OpenWindow.document.write("<center><a href='mailto:webmaster@webasp' target='main'>Email me</a></Center><br>") OpenWindow.document.write("<center><a href='javascript:close()'>Close this window</a></Center>") OpenWindow.document.close() self.name="main" } //End hiding--> </script> <form name="script"> <textarea name="tester" rows="8" cols="50" wrap="off"></textarea> <br> <input type="button" value="显示" onClick="test()"> <input type="button" value="清除" onClick="trestart()"> <input type="button" value="关于" onClick="about()"> <input type="button" value="帮助" onClick="help()"> </form> |
| webasp.net |