js
coco爱火女
这个作者很懒,什么都没留下…
展开
-
js前端打印
1、在页面的代码头部处加入 JavaScript: function onload() { bdhtml=window.document.body.innerHTML; sprnstr=""; eprnstr=""; prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); prnhtml=prnhtml.substrin原创 2015-03-30 14:43:54 · 487 阅读 · 0 评论 -
复选框默认被选中
var Store = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ url : ‘Info.action' }), reader : new Ext.data.JsonReader({ totalProperty : 'TOTALCOUNT', root : 'ROOT' }, [{ name : 'ID' }, {原创 2015-04-15 15:44:12 · 1063 阅读 · 0 评论 -
Ext grid多选后把选定的值提交到后台
var grid = new Ext.grid.GridPanel({ region : 'north', height : 300, // 表格面板标题,默认为粗体,这里设置样式将其格式为正常字体 title : '查询结果', frame : false, autoScroll : true, store : store, // 数据存储 stripeRows : true,原创 2015-04-15 15:57:46 · 1551 阅读 · 0 评论 -
JQ判断是否与服务器断开连接
var boolean = true; $.ajax({ url: 'http://192.168.246.100:8080/SkyMonWeb/images/12.png',//项目下的某张图片 type: 'GET', complete: function(response) { if(response.status == 200) { boolean = tru原创 2015-10-16 15:58:37 · 1095 阅读 · 0 评论 -
textarea替换换行和空格的方法
textarea替换换行和空格的方法 var reason=document.getElementById('temp').value.replace(/[\n\r]/gi,"").replace(/[ ]/g,""); replace(/[\n\r]/gi,"") //替换回车符 replace(/[ ]/g,""); //替换空格符原创 2015-12-17 18:17:40 · 2752 阅读 · 0 评论 -
HTML5 audio标签使用 浏览器触发函数提示声音(最小化后 、当前任务非浏览器时都可以使用)
1、上次写过一个浏览器播放提示音 但使用过程中不是很理想 (1)当前任务不是浏览器时(最前端运行浏览器)事件堆积到一起不执行 执行时一下子触发好多提示音 2、audio标签不存在这个问题具体代码如下 setInterval("myInterval()",5000);//1000为1秒钟 function myInterval() {原创 2016-03-24 17:40:03 · 3231 阅读 · 0 评论 -
window.event.keyCode - 兼容chrom和Firefox
1.HTML中加入onKeyDown事件 2.function keyCheck() { if (window.event.keyCode==38) { //向上键 } if (window.event.keyCode==40) { //向下键 } } 在chrom中是支持window.event.keyCode但是在Firefox原创 2016-04-08 13:44:39 · 2991 阅读 · 0 评论