|
[Ctrl+A 全選 注:如需引入外部Js需刷新才能執(zhí)行]
當(dāng)然解決方法很簡(jiǎn)單,在創(chuàng)建時(shí),使用document.createElement("<input name='select'>")。不過(guò)還不知道是什么原因?
在Name屬性的說(shuō)明中有這樣一句話:
In InterNET Explorer 5, the name property cannot be set at run time on anchor objects dynamically created with the createElement method. To create an anchor with a NAME attribute, include the attribute and value when using the createElement method, or use the innerHTML property.
JavaScript技術(shù):javascript createElement()創(chuàng)建input不能設(shè)置name屬性的解決方法,轉(zhuǎn)載需保留來(lái)源!
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。