js
luckytjx
做我喜欢做的事!
展开
-
SweetAlert-js应用
swal.setDefaults({confirmButtonText:'确定'}); 可将OK变为确定。 具体的各方法调用请参考网站:http://t4t5.github.io/sweetalert/原创 2015-09-18 22:48:08 · 519 阅读 · 0 评论 -
判断IE以及加载不同的js
$(function(){ var _IE = (function () { var v = 3, div = document.createElement('div'), all = div.getElementsByTagName('i'); while ( div.innerHTML = '',原创 2015-09-18 23:04:29 · 1265 阅读 · 0 评论 -
easyui datagrid组件应用
1)datagrid组件无数据时不能显示全部列。 解决办法: $('#dg3').datagrid({ onLoadSuccess:function(data){ if(data.total==0){ var dc = $(this).data('datagrid').dc;原创 2015-10-14 15:22:07 · 805 阅读 · 0 评论 -
不错的一款国产弹出js插件Layer
这款layer弹出层插件还是相当不错的,尤其是相当小,只有20K,大大加快网页的打开速度。 用到的Jquery最好使用Jquery1.8版本以上,效果会好些。 1、常用的弹出页面。 1)普通弹出窗体 layer.open({ type: 1, //page层 area: ['500px', '300px'], title: '你好,layer。', skin: 'la原创 2016-08-06 12:06:40 · 1084 阅读 · 0 评论 -
js编写类似c#的一串格式化字符的写法
这种方式改变了以前的拼接字符串的方式 /* * C#样式的字符串格式化 * Sample * strFormat("this is a {0}","test") => "this is a test" **/ function strFormat() { if (arguments.length == 0) return null; var...原创 2017-09-30 18:14:41 · 465 阅读 · 0 评论 -
JS中的常用方法
JS中常用方法 1.获取项目路径 下面的代码得到的链接为:http://127.0.0.1:8080/tj tj.getRootPath=function(){ var curWWWpath=window.document.location.href; var pathName=window.document.location.pathname; var pos=curWW原创 2017-10-09 23:32:12 · 590 阅读 · 0 评论 -
js编写类似c#的一串格式化字符的写法
js编写类似c#的一串格式化字符的写法/* * C#样式的字符串格式化 * Sample * strFormat("this is a {0}","test") => "this is a test" **/ function strFormat() { if (arguments.length == 0) return null; var str = argu原创 2017-11-06 21:16:56 · 600 阅读 · 0 评论