随笔分类 -  JavaScript

摘要:map.jsfunction Map() { this.elements = new Array(); //获取MAP元素个数 this.size = function() { return this.elements.length; ... 阅读全文
posted @ 2018-08-23 18:41 丁晓超 阅读(258) 评论(0) 推荐(0)
摘要:var myScript = document.createElement("script"); myScript.type = "text/javascript"; myScript.appendChild(document.createTextNode("script中间部分")); document.body.appendChild(myScript); 阅读全文
posted @ 2018-08-23 18:36 丁晓超 阅读(243) 评论(0) 推荐(0)
摘要:通过$("#form").serialize()可以获取到序列化的表单值字符串:a=1&b=2&c=3&d=4&e=5通过$("#form").serializeArray()输出以数组形式序列化表单值:[ {name: 'firstname', value: '... 阅读全文
posted @ 2018-08-20 18:24 丁晓超 阅读(148) 评论(0) 推荐(0)