android2.3的不支持滚动条,并且scrollTop也不支持的。(设置overflow未hidden就可以支持)。function noBarsOnTouchScreen(arg){ var elem, tx, ty; if('ontouchstart' in document.documen...
分类:
Web程序 时间:
2015-07-27 12:59:42
阅读次数:
121
Communication API Cross Document Messaging (跨文档消息通信) postMessage API origin security(源安全)chatFrame.contentWindow.postMessage('hello','http:...
【jquery 事件绑定】
1、添加元素事件绑定
(1) 添加事件为当前元素
$('p').on('click',function(){
//code here ...
});
(2) 添加事件为未来元素(动态添加元素)
$(document父).on('click','p子',function(){
//code here...
})
注意前后俩者对象...
分类:
Web程序 时间:
2015-07-27 11:07:31
阅读次数:
111
//合并单元格
function cellHandler(){
var tab = document.getElementById("data_table");
//maxCol循环列
var maxCol = 2, val, count, start;
for(var col = maxCol-1; col >= 0 ; co...
分类:
其他好文 时间:
2015-07-27 11:05:44
阅读次数:
108
Document Settings(文件设置)是用户用来定义设置当前文件的,它包括:绘制设置、说明文本设置、标记文本设置、打印/纸页设置及颜色设置(调色板)。绘制设置影响有关绘制的选择,如用于绘制键的固定键长;文本设置影响有关文本的选择,如用于原子标记的字体和说明;颜色设置影响有关颜色图形结构的选择...
分类:
其他好文 时间:
2015-07-27 10:51:45
阅读次数:
252
在jsp页面head添加部分: gotoTop.js内容例如以下:// JavaScript Document(function($){var goToTopTime;$.fn.goToTop=function(options){var opts = $.extend({},$.fn....
分类:
其他好文 时间:
2015-07-27 10:40:43
阅读次数:
120
有时候我们需要动态的加入适合的js,因为有时候不需要将所有的js都加载进来,以来提高效率,但这种方法比较适合单个js文件比较大的情况如果js文件都比较小,还是一个js好,这样可以减少连接数。下面是4种比较常用的方法,大家可以根据情况选择,最后脚本之家 将会给推荐一个。1、直接document.wri...
分类:
Web程序 时间:
2015-07-27 09:23:00
阅读次数:
125
终于弄懂了这个级联,我去!必须得在博客记下来。1, JS代码: 1 $(document).ready(function(){ 2 $("#select1").change(function(){ 3 adjustCountyDropDown(); 4 }); 5 }...
分类:
Web程序 时间:
2015-07-27 00:04:48
阅读次数:
222
JS:a标签点击和设置的onclik点击事件冲突:可在a标签内设置javasript:void(0);或取去消浏览器默认行为:event.prevertDefault()js获取style样式:document.stylesheets[0].cssRules[0].style;第一个0:如果是0表示...
分类:
其他好文 时间:
2015-07-27 00:02:58
阅读次数:
164
var rgExp = /(^\D*[0-9])/; var str = "this is fun 01 stuff";var resu = str.match(rgExp);document.writeln(resu);结果为: this is fun 0,this is fun 0如果使用圆括号...
分类:
其他好文 时间:
2015-07-26 22:22:17
阅读次数:
128