html网页调用js文件跳转写法
html网页代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<SCRIPT language=Javascript src="1.js" type=text/javascript></SCRIPT>
</head>
<body>
</body>
</html>
js文件代码:
window.location.href = "http://www.baidu.com";
或者复杂一点,做个变量
var _$ = ["http://www.baidu.com"];
window.location.href = _$[0];
或者window.navigate方式跳转
window.navigate("http://www.baidu.com");
============
附两个js加密解密网站
https://www.sojson.com/js.html
https://tool.lu/js/