它肯定運行在IE6上。爲什麼JavaScript不在Firefox中運行?
爲什麼JavaScript不在Mozilla Firefox中運行?
<html>
<head>
<title>JavaScript Popup Example 3</title>
</head>
<SCRIPT language="JavaScript1.2">
function MyClass()
{
this.OpenWindow = function()
{
var r = window.open ('', 'mywindow', 'location=1,status=1,scrollbars=1,width=100,height=100');
r.moveTo(0,0);
r.location.href = 'http://www.google.com';
}
}
</SCRIPT>
<body onload="javascript: new MyClass().OpenWindow()">
<H1>JavaScript Popup Example 3</H1>
</body>
</html>
將來請確保您提供了Firefox的版本號。您可以在幫助 - >關於Mozilla Firefox中找到它。 – 2009-11-29 16:48:12
您的onload屬性中不需要「javascript:」協議前綴。 on *屬性的內容需要一個腳本值。 – scunliffe 2009-11-29 17:17:06