单击图像以在 HTML 页面中打开新标签 如何添加可点击图像以在 html 页面中打开新标签?
试试这个
https://www.w3schools.com/jsref/met_win_open.asp
<!DOCTYPE html>
<html>
<body>
<p>Click the button to open multiple windows.</p>
<a href onclick="myFunction()"> <img src="smiley.gif" alt="HTML tutorial" style="width:42px;height:42px;border:0">
</a></a>
<script>
function myFunction() {
window.open("http://www.google.com/");
window.open("https://www.w3schools.com/");
}
</script>
</body>
</html>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句