<form>
<input TYPE="button" VALUE="返回上一步" ONCLICK="history.back(-1)">
</form>
弹出警告框代码:
<form>
<input TYPE="button" VALUE="弹出警告框" ONCLICK="AlertButton()">
</form>
<script language="JavaScript"><!--
function AlertButton(){window.alert("要多多光临呀!");}
// --></script>
点击打开新窗口
<form>
<input TYPE="button" VALUE="打开新窗口" ONCLICK="NewWindow()">
</form>
<script language="JavaScript"><!--
function NewWindow(){window.open("http://www.mcmx.com","","height=240,width=340,status=no,location=no,
toolbar=no,directories=no,menubar=no");}
// --></script>
删除记录时弹出确认框:
<script LANGUAGE="VBSCRIPT">
a=msgbox("真的要删除该记录吗?",1,"注意")
if a=1 then
location="Dodelete.asp?id=" //指向执行删除的页面Dodelete.asp
else
history.go(-1)
end if
</script>
关闭打开的窗口
<a href="/" onclick="javascript:window.close(); return false;">关闭窗口</a>