<!DOCTYPE html>
<html>
<head>
	<title>点击文本跳转链接</title>
	<script type="text/javascript">
		function redirectToLink() {
			window.location.href = 'https://www.example.com';
		}
	</script>
</head>
<body>
	<p onclick="redirectToLink()">点击这里跳转链接</p>
</body>
</html>
JS 点击文本跳转链接代码示例

原文地址: https://www.cveoy.top/t/topic/omz9 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录