Let the storm money come!

随笔分类 -  JS

一些我可以常用的js脚本
摘要:最近在个只可往他里面发邮件,不能往外上任何互联网的地方工作,用 sublimetext 要装个sublime 插件 jsformat 十分麻烦。用gmail邮箱发总是报病毒。 最后挨个尝试,发现是 jsbeautify 文件夹里的 两个 test 文件夹含有被邮件系统识别为病毒的东西。且在的这家公司 阅读全文
posted @ 2017-01-06 23:01 精密~顽石 阅读(455) 评论(0) 推荐(0) 编辑
摘要:https://www.sitepoint.com/introduction-gulp-js/ 参照这个例子做一遍,就会明白,中间会有个问题 npm install jshint 需要修正为 阅读全文
posted @ 2016-06-29 17:03 精密~顽石 阅读(309) 评论(0) 推荐(0) 编辑
摘要:$(document.body).on("click", ".comments-item .link-comment", function () {平时用 document 就可以了,今天硬是要用 document.body 才可以,这个问题没有深究,有时间可以看一下。 阅读全文
posted @ 2015-05-17 23:24 精密~顽石 阅读(208) 评论(1) 推荐(0) 编辑
摘要:动态添加元素的事件如果用on方法,要改成另一种写法$(document).on('click', '#list li', function() { //function code here.}); 阅读全文
posted @ 2014-09-30 14:10 精密~顽石 阅读(196) 评论(0) 推荐(0) 编辑
摘要:var alpha = [1, 2, 3, 4, 5, 6], beta = [4, 5, 6, 7, 8, 9];$.arrayIntersect = function(a, b){ return $.merge($.grep(a, function(i) { ... 阅读全文
posted @ 2014-08-11 10:35 精密~顽石 阅读(6290) 评论(0) 推荐(0) 编辑
摘要:缺点就是还是会闪出中文,但是效果还行。 var langPackage = {"主题":"Title", "下一页":"NextPage", "末页":"LastPage", "首页":" FirstPage ", "上一页":" PreviousPage ", "待办工作":"MyTasks", "中":"Middle&quo 阅读全文
posted @ 2013-11-15 16:13 精密~顽石 阅读(9455) 评论(0) 推荐(0) 编辑
摘要:$("#SomeIdoption[text='TextValue']").attr("selected",true); 阅读全文
posted @ 2011-12-12 11:16 精密~顽石 阅读(185) 评论(0) 推荐(0) 编辑
摘要:functiongetCurrentDay(){vardate=newDate();return{"start":date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate(),"end":date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate()};}functiongetCurrentYear(){vardate=newDate();return{& 阅读全文
posted @ 2011-04-20 10:21 精密~顽石 阅读(1582) 评论(0) 推荐(0) 编辑
摘要:$("#DataGrid1 tr:not(:eq(1))").find("td:last").hide(); 阅读全文
posted @ 2011-04-07 15:52 精密~顽石 阅读(150) 评论(0) 推荐(0) 编辑
摘要:varlastTdIndex=$("#processForm_DataGrid1trtd:last")[0].cellIndex;varheaderTdLastIndex=$("#processForm_DataGrid1tr[class=DgHeader]:eq(0)td:last")[0].cellIndex;$("#processForm_DataGrid1tr[class=DgHeader]:eq(0),#tbGridHeadtr[class=DgHeader]:eq(0)").find("td:gt("+ 阅读全文
posted @ 2011-03-28 17:48 精密~顽石 阅读(465) 评论(0) 推荐(0) 编辑
摘要:// 注意 :checked和它前面的字符串不能有空格 $(":checkbox[id^=processForm_cklFile]:checked").length 阅读全文
posted @ 2011-03-24 16:14 精密~顽石 阅读(327) 评论(0) 推荐(0) 编辑
摘要:处理长度,不允许其他字符 functionregInput(reg){if(reg=="")returnfalse;varsrcElem=event.srcElementvaroSel=document.selection.createRange()oSel=oSel.duplicate()oSel.text=""varsrcRange=srcElem.createTextRange()oSel.setEndPoint("StartToStart",srcRange)varnum=oSel.text+String.fromCharCo 阅读全文
posted @ 2011-03-23 17:29 精密~顽石 阅读(161) 评论(0) 推荐(0) 编辑
摘要:functiongetXmlData(xmlData,xpath){varouputXml="<xml>";$(xmlData).find(xpath).each(function(){ouputXml+=$(this)[0].xml.toString().replace(newRegExp($(this)[0].nodeName,"gi"),"row");});ouputXml+="</xml>";returnouputXml;}前提是要 xmlData 转化成 dom 阅读全文
posted @ 2011-03-21 16:08 精密~顽石 阅读(263) 评论(0) 推荐(0) 编辑
摘要:View Code本人要上传四个文件,但是上传里暂时没支持并列上传,所以只能排队,但是考虑到我的界面一些调整,只能用同步等待,但又不能阻塞别的线程,所以只能用上述代码。var_fnList=[function(){$("body").append(levelFn.length+':1');},function(){$("body").append(levelFn.length+'2');},function(){$("body").append(levelFn.length+'3');} 阅读全文
posted @ 2011-02-26 11:13 精密~顽石 阅读(224) 评论(0) 推荐(0) 编辑
摘要:$(":radio[name=processForm$rblPermissionType]:checked").val()=="4" 阅读全文
posted @ 2011-01-13 17:28 精密~顽石 阅读(328) 评论(0) 推荐(0) 编辑
摘要:jquery 隐藏列, html td th 一起隐藏。 $("#tblShowDatatr").find("td:last,th:last").hide(); 阅读全文
posted @ 2011-01-10 14:48 精密~顽石 阅读(178) 评论(0) 推荐(0) 编辑
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<html><head><scriptsrc="jquery-1.4.2.min.js"></script></head><body&... 阅读全文
posted @ 2010-11-24 17:46 精密~顽石 阅读(1032) 评论(0) 推荐(0) 编辑
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-t... 阅读全文
posted @ 2010-11-08 22:14 精密~顽石 阅读(1827) 评论(0) 推荐(0) 编辑
摘要:js 执行顺序错误,在低版本的 ie 浏览器中。 阅读全文
posted @ 2010-10-29 10:54 精密~顽石 阅读(2177) 评论(1) 推荐(0) 编辑
摘要:[代码] 阅读全文
posted @ 2010-09-14 10:47 精密~顽石 阅读(1292) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
在通往地狱的路上,加班能使你更快到达。
点击右上角即可分享
微信分享提示