<script language="Javascript"> if (confirm("确定要转向到CSDN?")) { window.location.href="http://www.csdn.net"; } </script>
//跳转并有数据提交时采用下面的方法: <script language="javascript"> function gonext(){ if (!confirm('This Will goto next page?do you realy want?')) { return false; } document.form1.action="next.html";//指定要跳转到的页面 dccument.submit();//提交页面
} </script><form name="form1" mothode="post"> <input type="button" name="goto" value="gotoanotherpage" onclick="javascript:gonext()"> <a href="#" onclick="javascript:gonext()">goto anotherpage </a> </form>//跳转,但是没有数据提交时采用下面的方法: <script language="javascript"> function gonext(){ if (!confirm('This Will goto next page?do you realy want?')) { return false; } location.href="next.html";
求代码啊
if (confirm("确定要转向到CSDN?"))
{
window.location.href="http://www.csdn.net";
}
</script>
<script language="javascript">
function gonext(){
if (!confirm('This Will goto next page?do you realy want?'))
{
return false;
}
document.form1.action="next.html";//指定要跳转到的页面
dccument.submit();//提交页面
}
</script><form name="form1" mothode="post">
<input type="button" name="goto" value="gotoanotherpage" onclick="javascript:gonext()">
<a href="#" onclick="javascript:gonext()">goto anotherpage </a>
</form>//跳转,但是没有数据提交时采用下面的方法:
<script language="javascript">
function gonext(){
if (!confirm('This Will goto next page?do you realy want?'))
{
return false;
}
location.href="next.html";
}
</script><form name="form1" mothode="post">
<input type="button" name="goto" value="gotoanotherpage" onclick="javascript:gonext()">
<a href="#" onclick="javascript:gonext()" target=blank>goto anotherpage </a>
</form>