我下面W3Schools的網站上的JavaScript教程工作,我有以下代碼:W3Schools的教程例如不與科達在Mac
<html>
<head>
<title>Hello!</title>
</head>
<body>
<script type="text/javascript">
function confirmShow
{
var r = confirm("Press one...")
if (r == true)
{
alert("Button pressed == OK")
}
if (r == false)
{
alert("Button pressed == Cancel")
}
}
</script>
<input type="button" onclick="confirmShow()" value="Show Confirm Box" />
</body>
</html>
,每當我預覽在科達或Safari中的警報從未表演向上。
在此先感謝!
偏題:W3Schools經常過時或表現不佳。爲了更好的替代品,嘗試在http://stackoverflow.com/questions/646032/whats-the-best-javascript-tutorial – outis 2010-05-05 00:16:10
http://w3fools.com/ – 2011-01-14 17:59:48