function?getStyle(el,cssProp){
????if(el.currentStyle){???//?ie
????????return?el.currentStyle[sccProp];
????}
????else?if(window.getComputedStyle){
????????retur...
分类:
Web程序 时间:
2015-10-15 18:59:15
阅读次数:
136
setTimeout(get_redis_num,5000);functionget_redis_num(){$(‘.span_redis‘).each(function(){varmessage=$(this).attr(‘id‘);varthat=this;$.get(‘ajax.php?redis_id=‘+message,{},function(data){if(data.nums){varnums=data.nums;if(nums>0){messages="剩余"+nums+"个车..
分类:
其他好文 时间:
2015-10-15 18:53:40
阅读次数:
158
$().find("option:selected").val();document.getElementByid("").options[1].selected=true;javascript中没有trim;String.prototype.trim = function(){return thi...
分类:
其他好文 时间:
2015-10-15 18:42:02
阅读次数:
113
jQuery获取Select选择的Text和Value:语法解释:1. $("#select_id").change(function(){//code...}); //为Select添加事件,当选择其中一项时触发2. var checkText=$("#select_id").find("...
分类:
Web程序 时间:
2015-10-15 18:24:21
阅读次数:
208
思路是:显示弹层时,禁用触摸事件在你显示弹出框的时候:添加:function ShowDiv() { window.ontouchmove = function(e) { e.preventDefault && e.preventDefault(); e.retur...
分类:
移动开发 时间:
2015-10-15 18:16:32
阅读次数:
515
上传预览var IsIllegal = false; function SelectFile(obj) { document.getElementById('textfield').value = obj.value; IsIllegal = false; } 打资源管理器添加execl文件 $("...
分类:
Web程序 时间:
2015-10-15 18:15:29
阅读次数:
229
使用正则表达式验证输入的字符串的长度,中文占2个字节,英文和数字占一个字节。调用getStrLenght函数,第一个参数传入字符串,第二个参数传入验证的长度,如果在验证长度的范围之内返回true,否则返回false。function getStrLenght(message,MaxLenght) {...
分类:
Web程序 时间:
2015-10-15 18:15:04
阅读次数:
194
Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function to...
分类:
编程语言 时间:
2015-10-15 17:58:36
阅读次数:
142
“FFI” 的全名是 Foreign Function Interface,通常指的是允许以一种语言编写的代码调用另一种语言的代码。而 “Libffi” 库只提供了最底层的、与架构相关的、完整的”FFI”,因此在它之上必须有一层来负责管理两种语言之间参数的格式转换。高级语言编译器产生代码时都会依据一...
分类:
其他好文 时间:
2015-10-15 17:50:24
阅读次数:
167
在之前几遍博客中讲到了怎么利用JS去调用Android的本地代码。其实很简单,在Android本地代码中:webView.loadUrl("javascript:sayHello()"); 然后在html中: function sayHello(){ document.getElement...
分类:
移动开发 时间:
2015-10-15 16:00:37
阅读次数:
172