代码 - 翼展电脑服务中心


JS多条件IF判断输入的参数

2016-9-17 乱云飞 代码 评论(0) 浏览(923) 标签: JS代码

var url = location.search.substring(1,location.search.length);
if (url.indexOf("://") > 0 & url.indexOf(".") > 0)  //输入的参数包含://而且包含.判断为网址
  {  document.write("输入的是网址"+url)  }
else if (url.length==0)
  {  document.write("没有输入参数"+url)  }
else if (url.length==9)
  {  document.write("输入的是9位序列号"+url)  } 
else if (url.length==11 || url.length==12)  
{  document.write("输入的是11位或12位序列号"+url)  }
else  
{  document.write("其他情况ERROR"+url);  };

判断网址问号后面输入的参数是否包含字符

2016-9-14 乱云飞 代码 评论(0) 浏览(785) 标签: 字符串 JS代码

var url = location.search.substr(1);//获取输入的参数
if(url.indexOf("://") > 0 ){//判断参数是否包含字符://
document.write ("包含字符://");
}
else{document.write ("不包含字符://");} 

判断网址问号后面输入的参数长度

2016-9-14 乱云飞 代码 评论(0) 浏览(846) 标签: JS代码 网址 问号

//判断网址问号后面输入的参数长度
var a = location.search.substr(1);//解析参数
if (a.length>10){//判断参数长度大于
document.write (a)//输出参数
};

js判断当前url中是否包含问号?参数

2016-9-10 乱云飞 代码 评论(0) 浏览(840) 标签: JS代码

//做某个页面需要提取参数加入标题里,但是需要先判断,如果没有参数就不加。
var url=location.search; 
if(url.indexOf("?")!=-1) 
{document.title='有参数';} 
else{document.title='没参数'; 
} 

php 传递参数中的问号怎么隐藏?

2016-9-10 乱云飞 代码 评论(0) 浏览(730) 标签: php代码 隐藏问号

00000000.png 

用VLC网页插件播放RTSP监控代码

2016-8-30 乱云飞 代码 评论(0) 浏览(730) 标签: 网页插件

<object type='application/x-vlc-plugin' pluginspage="http://www.videolan.org/" id='vlc' events='false' width="720" height="450">
    <param name='mrl' value='rtsp://admin:********@192.168.1.81/h264/ch1/main/av_stream' />
    <param name='volume' value='50' />
    <param name='autoplay' value='true' />
    <param name='loop' value='false' />
    <param name='fullscreen' value='false' />
    <param name='controls' value='false' />
</object>

只能用绑定的域名访问网站ASP代码

2016-8-23 乱云飞 代码 评论(0) 浏览(873) 标签: 网站域名 ASP代码

<%
if Request.ServerVariables("SERVER_NAME")<>"80c.cc" then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://80c.cc/"
end if
%>

路由器iptables防火墙配置备份

2016-7-11 乱云飞 代码 评论(0) 浏览(1791) 标签: iptables 路由器配置 防火墙

#下面一行是虚假PING值
#iptables -t nat -I PREROUTING -i br0 -p icmp -j REDIRECT
#//下面一行是劫持所有网站到指定IP和端口
#iptables -t nat -A PREROUTING -p tcp -m multiport --dport 80,8080 -j DNAT --to 192.168.1.1:83
#使用下面的语法来开启端口范围
#iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 7000:7010 -j ACCEPT
#//禁止所有视频flv
#iptables -I FORWARD -p tcp --dport 80 -m flv -j DROP

路由器广告过滤配置备份

2016-6-23 乱云飞 代码 评论(0) 浏览(1848) 标签: 路由器 去广告 广告过滤

#enable-tftp
#tftp-root=/opt/lib/ezboot
#dhcp-boot=grldr,,192.168.1.1
address=/.ad.winrar.com.cn/192.168.1.1
address=/.xl9.xunlei.com/192.168.1.1
address=/.i3.go2yd.com/192.168.1.1
address=/.ad.xiaomi.com/192.168.1.1
address=/.union.mi.com/192.168.1.1
address=/.stat.mi.com/192.168.1.1
address=/.msg.xiaomi.net/192.168.1.1
address=/.game.xiaomi.com/192.168.1.1
address=/.mistat.xiaomi.com/192.168.1.1
address=/.tracking.miui.com/192.168.1.1
address=/.home.wps.cn/192.168.1.1
address=/.ic.wps.cn/192.168.1.1
address=/.ic100.wps.cn/192.168.1.1
address=/.dyn.wps.cn/192.168.1.1
address=/.adsrich.qq.com/192.168.1.1
address=/.kkeye.com/192.168.1.1
address=/.08le.cn/192.168.1.1
address=/.pp6l.com/192.168.1.1
address=/.fastapi.net/192.168.1.1
address=/.wpscdn.cn/192.168.1.1
#address=/.bdimg.com/192.168.1.1
address=/.info.wps.cn/192.168.1.1
address=/.mini.wps.cn/192.168.1.1
address=/.cache.wps.cn/192.168.1.1
address=/.ksosoft.com/192.168.1.1
address=/.169.cn/192.168.1.1
address=/.169x.cn/192.168.1.1
address=/.flash2-http.qq.com/192.168.1.1
address=/.360.cn/192.168.1.1
#address=/.360.com/192.168.1.1
address=/.360buyimg.com/192.168.1.1
address=/.4kt2.com/192.168.1.1
address=/.50bang.org/192.168.1.1
address=/.51.la/192.168.1.1
address=/.70e.com/192.168.1.1
address=/.71.am/192.168.1.1
address=/.ads.ce.com/192.168.1.1
address=/.adserv.kunming.cn/192.168.1.1
address=/.adshmct.qq.com/192.168.1.1
address=/.adshmmsg.qq.com/192.168.1.1
address=/.allyes.com/192.168.1.1
address=/.api.miwifi.com/192.168.1.1
address=/.baidustatic.com/192.168.1.1
address=/.baofeng.com/192.168.1.1
address=/.baofeng.net/192.168.1.1
address=/.behe.com/192.168.1.1
address=/.c.gdt.qq.com/192.168.1.1
address=/.c.gj.qq.com/192.168.1.1
address=/.cb.baidu.com/192.168.1.1
address=/.chinauma.com/192.168.1.1
address=/.click.jd.com/192.168.1.1
address=/.clicklog.moviebox.baofeng.net/192.168.1.1
address=/.client.show.qq.com/192.168.1.1
address=/.clk.gentags.net/192.168.1.1
address=/.clkservice.youdao.com/192.168.1.1
address=/.cnzz.com/192.168.1.1
address=/.cpro.baidustatic.com/192.168.1.1
address=/.deliver.ifeng.com/192.168.1.1
address=/.doubleclick.net/192.168.1.1
address=/.duba.com/192.168.1.1
address=/.duba.net/192.168.1.1
address=/.duokanbox.com/192.168.1.1
address=/.e.baidu.com/192.168.1.1
address=/.eiv.baidu.com/192.168.1.1
address=/.entry.baidu.com/192.168.1.1
address=/.eu.10jqka.com.cn/192.168.1.1
address=/.fodder.qq.com/192.168.1.1
address=/.g.163.com/192.168.1.1
address=/.g1.163.com/192.168.1.1
address=/.googlesyndication.com/192.168.1.1
address=/.hd.sohu.com/192.168.1.1
address=/.hd.sohu.com.cn/192.168.1.1
address=/.he8e.com/192.168.1.1
address=/.hm.baidu.com/192.168.1.1
address=/.hm.l.qq.com/192.168.1.1
address=/.houyi.baofeng.net/192.168.1.1
address=/.ijinshan.com/192.168.1.1
address=/.imc.l.qq.com/192.168.1.1
address=/.imgcache.qq.com/192.168.1.1
#address=/.iqiyi.com/192.168.1.1
#address=/.video.qiyi.com/192.168.1.1
#address=/.update.ppstream.com.iqiyi.com/192.168.1.1
address=/.irs01.com/192.168.1.1
address=/.irs01.net/192.168.1.1
address=/.l.qq.com/192.168.1.1
address=/.liebao.cn/192.168.1.1
address=/.m.ys7.com/192.168.1.1
address=/.masterconn.qq.com/192.168.1.1
address=/.mediav.com/192.168.1.1
address=/.miwifi.com/192.168.1.1
address=/.pc120.com/192.168.1.1
address=/.pos.baidu.com/192.168.1.1
address=/.q.i.gdt.qq.com/192.168.1.1
address=/.sax.sina.com.cn/192.168.1.1
address=/.showxml.qq.com/192.168.1.1
address=/.sogou.com/192.168.1.1
address=/.soueast-motor.outku.com/192.168.1.1
address=/.stat.titan.imgo.tv/192.168.1.1
address=/.stat.yunfan.com/192.168.1.1
address=/.tanx.com/192.168.1.1
address=/.tuisong.baidu.com/192.168.1.1
address=/.tv.sohu.com/192.168.1.1
address=/.v.gdt.qq.com/192.168.1.1
address=/.wan.2345.com/192.168.1.1
address=/.wangmeng.baidu.com/192.168.1.1
address=/.wo.com.cn/192.168.1.1
address=/.wrating.com/192.168.1.1
address=/.x.jd.com/192.168.1.1
address=/.yeyou.2345.com/192.168.1.1
address=/.yingxiao.baidu.com/192.168.1.1
address=/.fa.163.com/192.168.1.1
address=/.hao.169.cn/192.168.1.1

JS限制图片维度(限制图片显示宽度)

2016-2-14 乱云飞 代码 评论(0) 浏览(916) 标签: 维度 JS代码 限制图片宽度

//查找网页内宽度太大的图片进行缩放
function ReImgSize(){
for (i=0;i<document.images.length;i++)
{
if (document.images[i].width>600)
{
document.images[i].width="600"
}
}
}
上面的代码保存成width.js
<script src="/inc/width.js" type="text/javascript"></script>
<body onload="ReImgSize()">

这个代码效果不错,但是怎么样才能让某个图片例外呢?比如 banner 。希望会的朋友交流一下。

预ICP备10086-001号 © 翼展网/80C.CC 技术支持/洛阳翼展科技
TEL / 13213610060 QQ / 345794501
Powered by emlog