我只想說用HTML的下拉菜單完成了,不用寫得那么累。
<select>
<option></option>
</select>
<select>
<option></option>
</select>
if(ele.addEventListener){ele.addEventListener(type,hander,false);}else if(ele.attachEvent){ele.attachEvent('on'+type,hander);}else{ele['on'+type]=hander;}login_box.style.display="block";login_box.style.display="none";addEvent(login_btn,"click",showLogin)addEvent(close,"click",hideLogin);
感覺有鬼,我自己敲一模一樣報錯,復制老師的就沒錯:
Uncaught TypeError: Cannot call method 'getElementsByTagName' of null ?
代碼真的是一模一樣。見鬼了
Uncaught TypeError: Cannot call method 'getElementsByTagName' of null ?
代碼真的是一模一樣。見鬼了
2017-03-01
if(l<0){
l=0;
}else if(l>maxW-10){
l=maxW-10;
}
if(t<10){
t=10;
}else if(t>maxH){
t=maxH;
}
l=0;
}else if(l>maxW-10){
l=maxW-10;
}
if(t<10){
t=10;
}else if(t>maxH){
t=maxH;
}
2017-02-28
沒做過前端工作之前 聽這個 感覺是 一臉懵逼, 然后現在來聽的時候突然發現全部能聽懂了,就是不知道能不能靈活運用了!嘿嘿。。。
2017-02-27