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