var temp_form = document.createElement('form')
var temp_ifr = document.createElement('iframe')
// 设置form属性
temp_form.action = url + '&scope=' + scope
temp_form.target = 'form_iframe'
temp_form.method = 'post'
temp_form.style.display = 'none'
temp_ifr.id = 'id_iframe'
temp_ifr.name = 'form_iframe'
temp_ifr.style.display = 'none'
document.body.appendChild(temp_form)
document.body.appendChild(temp_ifr)
temp_form.submit() // 向iframe中跳 这里已经被隐藏了
document.body.removeChild(temp_form)
document.body.removeChild(temp_ifr)
form提交表单(下载)且不跳转
最新推荐文章于 2024-06-19 10:00:40 发布