關于賦值的問題
Lists[i].setAttribute("title","WEB前端技術"); ? ?document.write(Lists[i].getAttribute("title")+" ");改為: text= Lists[i].setAttribute("title","WEB前端技術"); ? ?document.write(texxt+" ");結果卻是undefined???
Lists[i].setAttribute("title","WEB前端技術"); ? ?document.write(Lists[i].getAttribute("title")+" ");改為: text= Lists[i].setAttribute("title","WEB前端技術"); ? ?document.write(texxt+" ");結果卻是undefined???
2016-02-01
舉報
2016-02-01
document.write(texxt+" ") 改為text
2016-03-03
Lists.setAttribute("title","web前端技術")給title屬性賦予了值,如果給它一個變量var text并不能返回值是"web前端技術";我也你試了你的代碼返回是undefined,這個方法是沒有返回值我覺得