文字收缩、展开(默认展开)
html: p span JavaScript 是属于网络的脚本语言!... / span a href = javascript:; 收缩 / a / p css: a { text-decoration : none;} /* 去掉a的默认下划线*/ js: var oP = document .getElementsByTagName( p )[ 0 ];var oSpan...
html: p span JavaScript 是属于网络的脚本语言!... / span a href = javascript:; 收缩 / a / p css: a { text-decoration : none;} /* 去掉a的默认下划线*/ js: var oP = document .getElementsByTagName( p )[ 0 ];var oSpan...
1、 substring( ) 截取字符串:substring(a,b ); a:从0数,第a位开始; b:取b个字符串; 例如: substring( 2,3)表示从0数到2,然后截取3个字符(包括第2位字符); 如果后面数字比前面数字大...
!doctype html html head meta charset = utf-8 title 简单的倒计时--跳转 / title script src = http://libs.baidu.com/jquery/1.11.3/jquery.min.js / script style * { margin : 0px ; padding : 0px ; } .box { width : 450px ; border : 1px sol...
!doctype html html head meta charset = utf-8 title 获取判断浏览器类型 / title script src = http://libs.baidu.com/jquery/1.11.3/jquery.min.js / script style div { color :blue;} / style / head body div style = color: #ccc; 您使用的...
!DOCTYPE HTML html head meta charset = UTF-8 meta name = viewport content = width=device-width, initial-scale=1.0 meta http-equiv = X-UA-Compatible content = ie=edge title 获取视频播放结束 / title / head body video id = media contro...
!doctype html html head meta charset = utf-8 title 去除字符串中的所有空格 / title script src = http://libs.baidu.com/jquery/1.11.3/jquery.min.js / script / head body script function Trim ( str ) { var result; result = str.replace...
!doctype html html head meta charset = utf-8 title 鼠标悬停边框围绕效果 / title script src = http://libs.baidu.com/jquery/1.8.3/jquery.min.js / script style * { margin : 0 ; padding : 0 ; list-style :none;} img { border : 0 ; widt...
!doctype html html head meta charset = utf-8 title 银行卡四位空格 / title script src = http://libs.baidu.com/jquery/1.11.3/jquery.min.js / script style / style / head body input type = text id = kahao script $( function () { $( #kaha...