开发者

how stop transfering form data when form is submitted to internal iframe?

开发者 https://www.devze.com 2022-12-17 07:42 出处:网络
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.

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();
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号