我使用隐藏的iframe方法进行文件上传,并且在IE中无法正常工作。问题是在IE中未调用服务器响应后调用的函数。
该生产线是
document.getElementById("iframe_id").onload = uploadDone;
我也试过window.iframe_id.onload
,document.iframe_id.onload
等
我不认为存在任何代码其他错误,因为这在FF和铬工作正常。
我尝试了一个警报,而不是函数名(uploadDone),它工作(虽然在脚本调试器中显示错误)。但取代完整的功能,如:
...onload = function() {...};
那里既不工作。
有人可以帮助我在IE中做这个工作吗?
在此先感谢。document.getElementById(“iframe_id”)。onload在IE中不起作用
0
A
回答
0
我强烈建议你看看使用JQuery或其他JavaScript框架。它会为你节省很多的痛苦....
+0
..不完全确定jQuery是否会在这种特殊情况下提供帮助,但是? – 2010-09-09 12:21:24
+0
啊没事,我站好了。似乎它确实:http://stackoverflow.com/questions/205087/jquery-ready-in-a-dynamically-inserted-iframe – 2010-09-09 12:22:15
0
相关问题
- 1. jquery:.onload()函数在IE中不起作用
- 2. document.getElementById()。值在Firefox中不起作用
- 3. document.getElementById('myControl')。focus()在PhoneGap中不起作用
- 4. document.getElementById在TypeScript中不起作用
- 5. document.getElementById()。onmousedown不起作用
- 6. UIWebView iOS document.getElementByID不起作用
- 7. javascript document.getElementById(“device”)不起作用?
- 8. document.getElementByID()。submit()不起作用
- 9. body onload在Javascript中不起作用
- 10. 'Body onload'在IE6中不起作用?
- 11. onload()在Firefox中不起作用
- 12. onload函数在iFrame中不起作用
- 13. 在IE中不起作用
- 14. document.getElementById().value和document.getElementById()。checked不适用于IE
- 15. innerHTML中的Ajax document.getElementById不起作用
- 16. document.getElementById在Firefox上不起作用
- 17. 文档OnLoad不起作用
- 18. html body onload不起作用
- 19. 的document.getElementById在IE
- 20. onload在Chrome上不起作用
- 21. CollapsiblePanelExtender不起作用在IE
- 22. 日期时间与document.getElementById不起作用
- 23. document.getElementById有效,但document.getElementsByTagName不起作用
- 24. 多个“document.getElementById”脚本不起作用
- 25. Js onload和document.getElementById不适合我
- 26. 跨浏览器问题:document.getElementById()。值在IE中不起作用,但在Firefox中工作
- 27. HttpContext.Current.Response.Cookies.Add在IE中不起作用?
- 28. javascript在IE中不起作用(getElementById)
- 29. .Html JQuery在IE中不起作用
- 30. Request.ServerVariables(“HTTP_REFERER”)在IE中不起作用
你在分配src之前分配onload事件吗? – 2010-09-09 12:17:16