posts - 431,  comments - 344,  trackbacks - 0

          今天在做頁面的時候遇到一個問題: 在使用YUI的彈出頁面的時候,innerHTML在FireFox下面第一次可以,然后再重新彈出頁面的時候就無效了,但在IE下面是好的.代碼如下:
          function disciplineChanged(value) {
            if (value == 'Audit') {
             dueDateLabel.innerHTML="<ext:message key='investigations.newdisciplinarysanction.casedisciplinedetail.numberofceu.title'/>";
            }else if (value == 'Additional CEU') {
             dueDateLabel.innerHTML="<ext:message key='investigations.newdisciplinarysanction.casedisciplinedetail.expiration.title'/>";
            } else if(value == 'Due Date') {
             dueDateLabel.innerHTML="<ext:message key='investigations.newdisciplinarysanction.casedisciplinedetail.duedate.title'/>";
            }
            
           }

          后來改為使用標準寫法就可以了.document.getElementById("dueDateLabel")
          function disciplineChanged(value) {
            if (value == 'Audit') {
             document.getElementById("dueDateLabel").innerHTML="<ext:message key='investigations.newdisciplinarysanction.casedisciplinedetail.numberofceu.title'/>";
            }else if (value == 'Additional CEU') {
             document.getElementById("dueDateLabel").innerHTML="<ext:message key='investigations.newdisciplinarysanction.casedisciplinedetail.expiration.title'/>";
            } else if(value == 'Due Date') {
             document.getElementById("dueDateLabel").innerHTML="<ext:message key='investigations.newdisciplinarysanction.casedisciplinedetail.duedate.title'/>";
            }
            
           }
          浪費了我半小時的時間!

          posted on 2008-06-19 17:42 周銳 閱讀(1914) 評論(5)  編輯  收藏 所屬分類: CSSHTML
          主站蜘蛛池模板: 湖口县| 涿鹿县| 中宁县| 城固县| 宜兰县| 都江堰市| 华池县| 永福县| 体育| 泰顺县| 离岛区| 射洪县| 祁连县| 婺源县| 和平县| 新和县| 白沙| 定西市| 永昌县| 宾川县| 蒲江县| 商水县| 古田县| 红安县| 安岳县| 湘潭市| 涟源市| 宝清县| SHOW| 来宾市| 郸城县| 于田县| 化德县| 牟定县| 鄂尔多斯市| 万载县| 大渡口区| 乐清市| 湖南省| 沙湾县| 南皮县|