js日期重写
摘要:Date.prototype.Format = function (fmt) { var o = { "M+": this.getMonth() + 1, //月份 "d+": this.getDate(), //日 "h+": this.getHours(), //小时 "m+": this.getMinutes...
阅读全文
js中快速获取数组中的最大值最小值
摘要:var a=[1,2,3,5];alert(Math.max.apply(null, a));//最大值alert(Math.min.apply(null, a)); //最小值多维数组如下var a = [1, 2, 3, [5, 6], [1, 4, 8]];var ta = a.join(",").split(","); //转化为一维数组alert(Math.max.apply(null,...
阅读全文
js字符拼接
摘要:for (var j = 0; j < 9; j++) { eval("if (datas[i].b" + j + " == '1') { b[j-1] = 1; }"); eval("if (datas[i].c" + j + " == '1') { c[j-1] ...
阅读全文
js从后台无法取值问题
摘要:前台代码后台代码public partial class statics_Default : System.Web.UI.Page{ public string json_addusers = string.Empty; public string json_dates = string.Empty; protected void Page_Load(object sender,...
阅读全文
json全套
摘要:JS文件function pager1_InitData() { //基础配置 $("#pager1").myPagination({ currPage: 1, pageCount: 1, pageSize: 10, cssStyle: 'quotes', info: { cookie_curr...
阅读全文
js传url中文参数乱码问题
摘要:$("#btnKeyWord").click(function () { window.open("/Atraction/Atraction.aspx?keyword=" + encodeURI(encodeURI($("#txtKeyWord").val()))); });注意:这里要两次转码$("#searchContent").val(decodeURI(getQuery...
阅读全文
JS三元
摘要:((productDatas[i].Img.indexOf("http") == -1) ? ("/upload/190-160/" + productDatas[i].Img) : productDatas[i].Img)
阅读全文
js:confirm
摘要:OnClientClick="javascript:return confirm('是否继续?');"
阅读全文
json
摘要:{ "programmers": [ { "firstName": "Brett", "lastName":"McLaughlin", "email": "brett@newInstance.com" }, { "firstName": "Jason", "lastName":"Hunter", "email": "jason@servlets.c
阅读全文
实现类似51job的选择框
摘要:51job上的效果 没找到, 弄个有点像的. 它的二层是多选框 偶的比较难堪 显示写个下拉框, 也可以从数据库获取 <select style="margin: 0px auto; width: 130px;" onchange="showSelect(this.value)" name=""> <option value="-1...
阅读全文
js-definition-guide0221
摘要:1.1 Core JavaScript This section is a tour of the JavaScript language. Types, Values, and Variables // variable is a symbolic name for a value.// Variables are declared with the var keyword:var ...
阅读全文