i have a upl开发者_JS百科oad file form and a iframe. form is submitted to a php script with target to iframe. i want to stop uploading file when user click on a stop uploading button. how can i stop transfering data to iframe?
You have to break the connection. And the only way to do this is to reload the page with
btn.onclick = function() { window.location.reload(true); }
You can't. You could reload the iframe though.
finally i use this:
function stopiframe('iframename'){
if(/MSIE (\d+\.\d+);/.test(navigator.userAgent))
window.frames['iframename'].window.document.execCommand('Stop');
else
window.frames['iframename'].window.stop();
}
精彩评论