返回列表 發帖

點月曆會出現錯誤

用IE8點選月曆但是都會跳"物件不支援此屬性或方法"
第28行有錯誤"cal.setDate(window.dialogArguments);"
在win7下開都會這樣,但在XP下又可以開
IE都是8,是寫法有出錯嗎?
請各位高手幫忙一下
<html>
<head>
<title>選擇日期</title>
</head>

<body topmargin="0" leftmargin="0" scroll="no" bgcolor="#c0c0c0">

<table border="0" cellpadding="0" cellspacing="0" width="22">
  <tr>
    <td>
      <OBJECT data=calendar2.htm id=cal style="HEIGHT: 160px; LEFT: 0px; TOP: 0px; WIDTH: 200px" type=text/x-scriptlet width="14" height="14"></OBJECT>
    </td>
  </tr>
  <tr>
    <td><input type="button" value="確定" name="cmdClose" style="WIDTH:200px" ONCLICK="window.close();"></td>
  </tr>
</table>

<p>
<script LANGUAGE="JavaScript" FOR="cal" EVENT="onscriptletevent(name,eventdata)">
        dateChange(eventdata);
</script>
<script language="JavaScript">
<!--
window.onload = initWindow;
function initWindow() {
        window.returnValue = window.dialogArguments;
        cal.setDate(window.dialogArguments);
}

function dateChange(sValue) {
        window.returnValue = sValue;
        window.close();
}

// -->
</script></p>
</body>
</html>

試試看改用其他的月曆:
jQuery: http://jsgears.com/thread-81-1-1.html
mootools: http://jsgears.com/thread-107-1-1.html
To infinity and beyond!

TOP

返回列表 回復 發帖