1.链接到某页
onclick="location.href='filename.html'" />
2.返回(等同后退)
onclick="location.href='javascript:history.go(-1);'" value="返 回" />
3.打开新网页
onclick="window.open('filename.html')" />
4.打开无边框的新窗口
5.打开新网页同时指向另一页
6.打开无边框的新窗口同时指向另一页
7.点击按钮弹出确认alert窗口
方式一:
onClick="alert('是否确认提交?');location.href= 'filename.html';return false;" >
方式二:
onClick="if (confirm('是否确认提交?'))location.href= 'filename.html';return false;" >
java怎么学习?java怎么入门?java在哪学?java怎么学才快?不用担心,这里为大家提供了java速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号