web前端|js教程
javascript,转到,域名
web前端-js教程
外卖系统php源码下载,ubuntu下载其他版本,C语言爬虫乱码,php $ get,海南seo论坛lzw
1.如何利用JS判断当前来路域名并跳转到指定页面
下载管理系统源码和视频,怎么查ubuntu版本,tomcat启动时中文乱码,c编程爬虫程序,php动态压缩下载过期删除,湛江seo培训lzw
获取当前请求路径var href = location.href ;if(href.indexOf("baidu")>-1){ //跳转 location.href = "";}
2.
asp网站模板的源码下载,ubuntu写脚本程序,tomcat8配置调优,dht爬虫 内网穿透,php清除0字节文件,雪枫seolzw
今天有一客户要求他的网站输入两个不同的域名后需要载入不同网页头部。思前想来,也只有通过JS的判断来加载不同的CSS。
代码如下:
host = window.location.host;if (host=="") { document.write("")document.write(".head{ background: url(document.write("")}
3.不同的域名 输出不同的结果
if (window.location.href.indexOf("") > -1) { document.write("
介绍"); } else if (window.location.href.indexOf("") > -1) { document.write("介绍"); } else if (window.location.href.indexOf("") > -1) { document.write("介绍"); }