我有这个表格:http://lawb.co.il/HTMLPage.html
当有人点击提交按钮(“שלח טופס”)
时,他们会自动重定向。
点击“שלח טופס”
按钮后如何阻止此操作?
代码在这里 http://jsfiddle.net/TCpkb/4/
你能帮我解决一下吗?
最佳答案
而不是input type="submit"
使用
<input type="button" value"submit" onclick="dothis()"/>
<script>
function dothis(){
//do whatyever you want
//for example for custom redirect :-
window.location.href="www.google.com";
}
</script>
关于javascript - 提交后自定义重定向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12440196/