摘要: JS中的反斜杠 (\)是什么意思 在js中我们经常能看到“\”。让人有一种看不懂的错觉。那么,为什么本来正常的代码,要加上反斜杠呢,他的作用是什么呢 我们先来看一段代码 var txt="We are the so-called \"Vikings\" from the north." docume 阅读全文
posted @ 2018-11-24 14:50 程序员小明1024 阅读(3094) 评论(0) 推荐(0) 编辑
摘要: 第一种写法(1): 原符号 < <= > >= & ' "替换符号 &lt; &lt;= &gt; &gt;= &amp; &apos; &quot;例如:sql如下:create_date_time &gt;= #{startTime} and create_date_time &lt;= #{e 阅读全文
posted @ 2018-11-24 14:45 程序员小明1024 阅读(603) 评论(0) 推荐(0) 编辑
摘要: <!-- 设置clearfloat样式,让里面的div撑开外面的div,让高度自适应 --> <style type="text/css"> .clearfloat{clear:both;height:0;font-size: 1px;line-height: 0px;} </style> </he 阅读全文
posted @ 2018-11-24 14:43 程序员小明1024 阅读(2035) 评论(0) 推荐(0) 编辑
摘要: // 缓存中数据赋值 if (localStorage.zzkccbtqjwyj != null && localStorage.zzkccbtqjwyj != '') { var str = localStorage.zzkccbtqjwyj.split("&"); $.each(str, fun 阅读全文
posted @ 2018-11-24 14:34 程序员小明1024 阅读(209) 评论(0) 推荐(0) 编辑
摘要: /* description: Pinyin, to get chinese pinyin from chinese. license: MIT-style authors: Bill Lue requires: core/1.2.1: '*' provides: [Pinyin] ... */ / 阅读全文
posted @ 2018-11-24 14:27 程序员小明1024 阅读(1128) 评论(0) 推荐(0) 编辑
摘要: ReadOnly和Disabled的作用是使用户不能够更改表单域中的内容.但是二者还是有着一些区别的: 1、Readonly只针对input(text/password)和textarea有效,而disabled对于所有的表单元素有效,包括select,radio,checkbox,button等。 阅读全文
posted @ 2018-11-24 14:24 程序员小明1024 阅读(535) 评论(0) 推荐(0) 编辑
摘要: .divHXMDNoWrap{ width: 100px; /*必须设置宽度*/ overflow: hidden; /*溢出隐藏*/ text-overflow: ellipsis; /*以省略号...显示*/ white-space: nowrap; /*强制不换行*/ } 阅读全文
posted @ 2018-11-24 14:21 程序员小明1024 阅读(1365) 评论(0) 推荐(0) 编辑
摘要: function iFrameHeight(ifm) { //var ifm = document.getElementById('iframeBox4'); //var subWeb = document.frames ? document.frames["iframeBox4"].documen 阅读全文
posted @ 2018-11-24 14:20 程序员小明1024 阅读(499) 评论(0) 推荐(0) 编辑
摘要: //自动定位滚动条的位置 window.onbeforeunload = function () { var scrollPos; if (typeof window.pageYOffset != 'undefined') { scrollPos = window.pageYOffset; } el 阅读全文
posted @ 2018-11-24 14:14 程序员小明1024 阅读(928) 评论(0) 推荐(0) 编辑
摘要: var reg = /\w+[@]{1}\w+[.]\w+/; // 验证中文名称 function isChinaName(name) { var pattern = /^[\u4E00-\u9FA5]{1,6}$/; return pattern.test(name); } // 验证手机号 f 阅读全文
posted @ 2018-11-24 14:13 程序员小明1024 阅读(130) 评论(0) 推荐(0) 编辑