在IE7中document.getElementById('form').action=url会出错。
解决办法 document.getElementById('form').attributes['action'].value=url
这样就解决了。
解决办法 document.getElementById('form').attributes['action'].value=url
这样就解决了。
本文介绍了一个在Internet Explorer 7浏览器中更新表单Action属性时遇到的问题及解决方案。通常情况下,直接使用document.getElementById('form').action=url的方法会导致错误。解决这一问题的有效方法是通过操作DOM元素的attributes来修改Action属性的值:document.getElementById('form').attributes['action'].value=url。

被折叠的 条评论
为什么被折叠?