/********************************************************/
navigator.userAgent
userAgent属性是一个只读的字符串,是声明了浏览器用于http请求的代理头的值。
alert(navigator.userAgent);
/*********************************************************/
substr()
substr(start,length);从字符串中抽出从start开始的length数字的字符。
start 必须。要抽取的子串的起始下标,只能是数值,正数,表示从第n个字符开始,负数,表示从出现该字符串的第一个字符开始。
length
可选。表示抽出多少个字符
/*********************************************************/
indexOf()表示某个字符串值在字符串中首次出现的位置
stringObject.indexOf(searchvalue,fromindex);
searchvalue
必须。要寻找的参数。
fromindex
可选。表示要从字符串的第n个位置寻找要检索的位置。
/*********************************************************/
@media screen and (max-width:240px){
//分辨率小于240px,则执行下面内容
//内容
}
@media screen and (min-width:240px){
//分辨率大于或者等于240px,则执行下面内容
//内容
}
原文:http://my.oschina.net/chenfwind/blog/512194