2010-01-12 59 views
0

好吧,多虧了這裏的人們,我想出了我的js代碼的一部分,這使得我的鏈接無用,下面粘貼了...仍然試圖找出原因,但如果有人有任何見解,那簡直太好了......CSS-js渲染鏈接無用

function initJumpMenus() { 
    // Turns all <select> elements with the 'jumpmenu' class into jump menus 
    var selectElements = document.getElementsByTagName("select"); 
    for(i = 0; i < selectElements.length; i++) { 
     // Check for the class and make sure the element has an ID 
     if(selectElements[i].className == "jumpmenu" && 
      document.getElementById(selectElements[i].id) != "" 
     ) { 
      jumpmenu = document.getElementById(selectElements[i].id); 
      jumpmenu.onchange = function() { 
       if(this.options[this.selectedIndex].value != '') { 
        // Redirect 
      location.href=this.options[this.selectedIndex].value; 
       } 
      } 
     } 
    } 
} 

window.onload = function() { 
    initJumpMenus(); 
} 
+0

請勿使用'