[查看演示] 源码如下 ---------------------------------------------------------- <HTML>
<HEAD>
<TITLE>确认-www.51windows.Net</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="Author" CONTENT="51windows,海娃,haiwa">
<META NAME="Description" CONTENT="Power by 51windows.Net">
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
function Myjsconfirm()
{
if (confirm("你好吗?"))
{
alert("好!")
}
else
{
alert("为什么不好?")
}
}
</SCRIPT>
<SCRIPT LANGUAGE="VBScript">
<!--
function MyVbconfirm()
return = msgbox ("你好吗?",4)
if return=6 then
msgbox "好!"
else
msgbox "为什么不好?"
end if
end function
function MyVbconfirm2()
return = msgbox ("你好吗?",3)
if return=6 then
msgbox "好!"
elseif return=7 then
msgbox "为什么不好?"
else
msgbox "你有权保持沉默,但是你说的每一句话。。。"
end if
end function
//-->
</SCRIPT>
<button onclick='Myjsconfirm();'>Js确认</button> <button onclick='MyVbconfirm()'>VB确认</button> <button onclick='MyVbconfirm2()'>VB确认2</button>
</BODY>
</HTML>
<div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand">
<input type="button" name="Button" value="查看源代码" onClick= 'window.location = "view-source:" + window.location.href'></div> |