在IE7中document.getElementById('form').action=url会出错。解决办法 document.getElementById('form').attributes['action'].value=url这样就解决了。