How do I make this getElementsbyName work for IE (and FF)?

前端 未结 2 469
攒了一身酷
攒了一身酷 2021-01-27 16:54

This is the JavaScript that is errored on in IE but works in FF (error - \"document.getelementsbyname(...).0.innerhtml is null or not an object\":

var oldVal =         


        
2条回答
  •  长发绾君心
    2021-01-27 17:36

    GetElementByName functions differently across different browsers. I suggest you access your elements using jQuery.

提交回复
热议问题