
javascript
半凉半夏
这个作者很懒,什么都没留下…
展开
-
正则表达式
详解:http://www.blogjava.net/onejavaer/articles/79070.html转载 2014-08-05 15:27:00 · 352 阅读 · 0 评论 -
Jquery之经典用法
转自:http://www.mhtml5.com/2011/10/3143.html转载 2014-08-04 14:46:42 · 411 阅读 · 0 评论 -
统计图形
Chart.js中文文档:http://www.bootcss.com/p/chart.js/docs/转载 2014-09-22 22:05:14 · 497 阅读 · 0 评论 -
jsonp
webForm jsonp应用:http://blog.youkuaiyun.com/donet_expert/article/details/8149694webAPI jsonp应用:原创 2014-08-04 16:03:27 · 1218 阅读 · 0 评论 -
图片(js)
JQuery Image LazyLoad :http://www.appelsiini.net/projects/lazyload转载 2014-09-18 08:50:39 · 379 阅读 · 0 评论 -
IP地址查询接口
转自:http://www.hujuntao.com/api/the-ip-address-api-and-call-the-interface-method.htmltaobao: http://ip.taobao.com/service/getIpInfo.php?ip=113.81.80.87网易: http://ip.ws.126.net/ipquery搜狐: http转载 2014-01-23 11:45:31 · 4654 阅读 · 1 评论 -
JQuery Mobile
实例):http://www.w3school.com.cn/jquerymobile/jquerymobile_examples.asp转载 2014-10-21 14:10:05 · 430 阅读 · 0 评论 -
基于html5、JS实现的拍照上传图片
原理:调出摄像头,拍照保存到画布,将图片URi传送到后台前端代码(Index.cshtml):#video,#canvas {display: block;margin:1em auto;width:180px;height:180px;}#snap { display: block;margin:0 auto;width:80%;height:2em; }原创 2015-01-26 16:16:17 · 9234 阅读 · 0 评论 -
基于html5、JS实现的二维码扫码
原理:调出摄像头,拍照保存到画布,定时传送到解析函数说明:解析函数是后台c# .net MVC 实现的,解析函数用到的二维码解析API依赖于第三方二维码库google zxing , 因此需要先引用类库:zxing.dll、zxing.presentation.dll,如果你在网上找到可以用JS解析的麻烦留言相告,因为用JS解析是最好的方法,不用每次定时的发出http请求,也可以不用引原创 2015-01-26 10:28:02 · 65839 阅读 · 24 评论 -
前端MVC框架、类库、UI框架选择
CSS预处理器sass(基于Ruby服务端版)less(客户端版:基于js; 服务端版:基于nodejs)前端UI框架JqueryMiniUI: http://www.miniui.com/(适用于管理后台、ERP)Bootstrap 3.3:http://v3.bootcss.com/ (资料齐全、提供less、sass版)AUI: http://原创 2015-01-12 15:35:32 · 2522 阅读 · 0 评论 -
文件上传
手工代码: 拖拽图片到这里来并上传 h2 small{ color: #888; font-weight: normal; margin-left: 30px; font-size: 80%;}.box{ border: 1px solid #ccc; background: #f5f5f5; padding: 10px; margin-bottom:原创 2014-10-17 14:07:41 · 596 阅读 · 0 评论 -
编码 解码
escape方法并不编码字符+。而我们知道,在用户提交的表单字段中,如果有空格,则会被转化为+字符,而服务器解析的时候则会认为+号代表空格。由于这个缺陷,escape方法并不能正确地处理所有的非ASCII字符,你应当尽量避免使用escape方法,取而代之,你最好选择encodeURIComponent()方法。escape()不编码的字符:@*/+相对于使用escape方法,使用encod原创 2013-11-20 23:11:00 · 1004 阅读 · 0 评论 -
基于JS的拍照选图、相册选图
用JS实现调出摄像头拍照或从手机相册选择图片,然后返回移动终端,此处以Android为例(Eclipse工程),ios上也是一样的,其原理不依赖于移动终端原生API,而依赖于JS库jquery、cordova-2.2.0.js, cordova来自PhoneGap的nodejs环境js端能力库,文件比较大,截止到目前, Visual Studio 2015 也加入了完善的Android仿真器,及P原创 2015-01-26 16:55:40 · 2179 阅读 · 0 评论 -
Array.prototype.slice.call(arguments)
转自:http://www.cnblogs.com/littledu/archive/2012/05/19/2508672.html转载 2014-04-10 09:27:25 · 423 阅读 · 0 评论 -
JS中的call()和apply()方法
转自:http://uule.iteye.com/blog/1158829转载 2014-04-09 18:01:32 · 426 阅读 · 0 评论 -
弹出框
#mask { position: absolute; z-index: 990; display: none; width: 100%; background: #000; filter: alpha(opacity=50); /* 兼容IE9- */ -moz-opacity: 0.5;/* 兼容旧版Mozilla */原创 2014-03-08 15:12:54 · 537 阅读 · 0 评论 -
navigator浏览器信息
1.检测浏览器类型var ua = navigator.userAgent.toLowerCase(); var info = { ie:/msie/.test(ua) && !/opera/.test(ua), op:/opera/.test(ua), sa:/version.*safari/.test(ua),转载 2013-10-28 17:38:13 · 735 阅读 · 0 评论 -
js在IE和FF下的兼容性问题
http://www.cnblogs.com/ilexcai/archive/2011/08/20/2147173.html转载 2013-10-28 17:34:47 · 550 阅读 · 0 评论 -
js鼠标及对象坐标控制属性
offsetTop获取对象相对于版面或由 offsetParent 属性指定的父坐标的计算顶端位置。offsetLeft获取对象相对于版面或由 offsetParent 属性指定的父坐标的计算左侧位置。offsetHeight获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度。IE、Opera 认为 offsetHeight = clientHe转载 2013-11-20 22:54:40 · 696 阅读 · 0 评论 -
节点中的nodeName、nodeValue、nodeType
nodeName 属性含有某个节点的名称。元素节点的 nodeName 是标签名称属性节点的 nodeName 是属性名称文本节点的 nodeName 永远是 #text文档节点的 nodeName 永远是 #document注释:nodeName 所包含的 XML 元素的标签名称永远是大写的nodeValue对于文本节点,nodeValue 属性包含文本。转载 2013-11-20 23:00:11 · 1142 阅读 · 0 评论 -
JavaScript禁止网页操作
单的JS禁止页面右键菜单--避免网站信息被盗用 function block(oEvent){ if(window.event) oEvent=window.event; if(oEvent.button==2) alert("鼠标右键不可用"); } document.onmousedown=block;网页上禁止复制主要靠Ja原创 2013-11-20 23:04:19 · 893 阅读 · 0 评论 -
JS拖动技术--- 关于setCapture
window.onload=function(){ objDiv = document.getElementById('drag'); drag(objDiv);};function drag(dv){ dv.onmousedown=function(e){ var d=document; e = e || window.event;转载 2013-11-20 23:16:01 · 952 阅读 · 0 评论 -
JS特殊用途
//特殊用途 、//不缓存 //正则匹配 匹配中文字符的正则表达式: [u4e00-u9fa5] 匹配双字节字符(包括汉字在内):[^x00-xff] 匹配空行的正则表达式:n[s| ]*r 匹配HTML标记的正则表达式:/.*|/ 匹配首尾空格的正则表达式:(^s*)|(s*$)(像vbscript那样的trim函数)转载 2013-11-20 23:21:31 · 906 阅读 · 0 评论 -
给addEventListener调用函数加参数方法
一、用setAttribute()为元素增添属性,把要传递的参数赋给属性值;然后在所调用函数中加事件参数,如下:deleteTaskk = document.createElement("a");ii="3";color="red"deleteTaskk.setAttribute("moto", ii);deleteTaskk.setAttribute("color", color);转载 2013-11-20 22:32:49 · 9923 阅读 · 0 评论 -
用prototype给JS中的String对象追加函数
如:追加去空格函数String.prototype.Trim =function(){ return this.replace(/(^\s*)|(\s*$)/g,"");}String.prototype.LTrim =function(){ return this.replace(/(^\s*)/g,"");}String.prototype.RTrim =function(){ ret转载 2013-11-20 22:39:01 · 854 阅读 · 0 评论 -
表单文本输入框默认值的自动清除和恢复
HTML Code: JS Code:function init_input(id){ var inp = document.getElementById(id).getElementsByTagName('input'); for(var i = 0; i < inp.length; i++) { if(inp[i].type ==转载 2013-11-20 23:28:26 · 3650 阅读 · 0 评论 -
页面滚动动态加载数据,页面下拉自动加载内容
$(document).ready(function(){ var range = 50; //距下边界长度/单位px var elemt = 500; //插入元素高度/单位px var maxnum = 20; //设置加载最多次数 var num = 1;转载 2014-02-19 15:06:31 · 945 阅读 · 0 评论 -
JS操作Select大全
主要功能如下判断select选项中 是否存在Value="paraValue"的Item 向select选项中 加入一个Item 从select选项中 删除一个Item 删除select中选中的项 修改select选项中 value="paraValue"的text为"paraText" 设置select中text="paraText"的第一个I转载 2013-11-20 22:42:45 · 857 阅读 · 0 评论