1 条评论 / 474META标签详解

 

META标签分两大部分:HTTP标题信息(HTTP-EQUIV)和页面描述信息(NAME)。 

一、HTTP-EQUIV 

HTTP-EQUIV类似于HTTP的头部协议,它回应给浏览器一些有用的信息,以帮助正确和精确地显示网页内容。常用的HTTP-EQUIV类型有: 

1、Content-Type和Content-Language (显示字符集的设定)...

1 条评论 / 547用JS的正则表达式如何判断输入框内为中文或是英文或是数字

只能输入数字和英文的:
<input onkeyup="value=value.replace(/[\W]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
2.只能输入数字的:
<input onkeyup="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
3.只能输入全角的:
<input onkeyup="value=value.replace(/[^\uFF00-\uFFFF]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\uFF00-\uFFFF]/g,''))">
4.只能输入汉字的:
<input onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))">

2 条评论 / 811html中的条件注释

        有条件的注释有条件的注释只在Windows平台的IE上被识别,并从IE5起开始支持,它甚至可以区分版本5.0,5.5和6.0。代码:下面是一些“有条件的注释”,可以显示你正在使用的IE版本。如果你看不到,那么你用的不是IE:

<p><!--[if IE]>According to the conditional comment this is Internet Explorer<br /><![endif]-->

<!--[if IE 5]>According to the conditional comment this is Internet Explorer 5<br /><![endif]-->

<!--[if IE 5.0]>According to the conditional comment this is Internet Explorer 5.0<br /><![endif]-->.....

 

记乐簿 Notes Club - 网络心生活 - [ NC 博客 ] 京ICP备08010734号 京公网安备110105009835