onestopweb 阅读(100) 评论(0)
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>根据链接修改对应的内容</title>
</head>
<body>
<script>window.jQuery || document.write(unescape("%3Cscript src='http://libs.baidu.com/jquery/1.10.1/jquery.min.js' type='text/javascript'%3E%3C/script%3E")); </script>
<script type="text/javascript">
$(function() {
	linkModifyCont();
});
function linkModifyCont(){
	var link = window.location.href;
	if(link.indexOf('www')>0){
		document.write('存在www');
	}else if(link.indexOf('onestopweb')>0 || link.indexOf('demo')>0){
		document.write('存在aaa或demo');
	}else{
		document.write('找不到对应的链接内容');
	}
}
</script>
</body>
</html>

 

效果图:


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • 大小: 8.9 KB