摘要: try {var urlhash = window.location.hash;if (!urlhash.match("fromapp")){if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i))){}else{windo... 阅读全文
posted @ 2014-12-01 08:47 G-Beniot 阅读(1046) 评论(0) 推荐(0)
摘要: 去除手机浏览器标签默认高亮边框-webkit-tap-highlight-color 属性属性描述:这个属性可以指设置透明度。如果未设置透明度,iOS上的Safari会给予颜色一个默认的透明度。把透明度设为0,则会禁用此属性。如果你把透明度设为1,元素将会不可见。只用于iOS(iPhone和iPad... 阅读全文
posted @ 2014-11-20 13:56 G-Beniot 阅读(226) 评论(0) 推荐(0)
摘要: jQuery拥有可操作HTML元素和属性的方法。获得内容:text()--设置或返回所选元素的文本内容html()--设置或返回所选元素的内容(包括HTML标记)val()--设置或返回表单字段的值获取属性:attr()方法用于获取属性值例如:1 $("button").click(function... 阅读全文
posted @ 2014-11-14 15:29 G-Beniot 阅读(220) 评论(0) 推荐(0)
摘要: $(this).hide()-----隐藏当前元素$("p").hide()------隐藏所有段落$(".test").hide()--隐藏所有class="test"的元素$("#test").hide()--隐藏所有id="test"的元素文档就绪函数$(document).ready(fun... 阅读全文
posted @ 2014-11-14 15:28 G-Beniot 阅读(188) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2014-11-14 14:15 G-Beniot 阅读(420) 评论(0) 推荐(0)
摘要: // 对浏览器的UserAgent进行正则匹配,不含有微信独有标识的则为其他浏览器 var useragent = navigator.userAgent; if (useragent.match(/MicroMessenger/i) != 'MicroMessenger') { ... 阅读全文
posted @ 2014-11-14 14:14 G-Beniot 阅读(444) 评论(0) 推荐(0)
摘要: if(window.orientation!=0){ var obj=document.getElementById('orientation'); alert('横屏内容太少啦,请使用竖屏观看!'); obj.style.display='block';}window.onori... 阅读全文
posted @ 2014-11-14 09:56 G-Beniot 阅读(612) 评论(0) 推荐(0)
摘要: function orient() {if (window.orientation == 90 || window.orientation == -90) {//ipad、iphone竖屏;Andriod横屏$("body").attr("class", "landscape");orientati... 阅读全文
posted @ 2014-11-14 09:55 G-Beniot 阅读(280) 评论(0) 推荐(0)
摘要: 最近研究如给主页生成二维码,开始考虑使用googleapis。[html]但是,google……,大家都懂的不多说。后来网上搜索,找到了一个可以生成二维码的js库qrcode.js,不依赖任何其他代码,看着不错就下来来试试,果然很好用。qrcode.js的下载地址http://davidshimjs... 阅读全文
posted @ 2014-11-13 16:19 G-Beniot 阅读(249) 评论(0) 推荐(0)
摘要: robots.txt文件,提起这个概念,可能不少站长还很陌生:什么是robots.txt文件?robots.txt文件有什么作用?如何配置robots.txt文件?如何正确使用robots.txt文件?下面,就这些问题进行剖析,让你深入认识robots.txt文件。robots.txt文件是什么?r... 阅读全文
posted @ 2014-11-11 11:16 G-Beniot 阅读(5856) 评论(0) 推荐(0)