hi, 欢迎访问我的博客
上一页 1 ··· 3 4 5 6 7
摘要: //掺杂类实现聚合(有的时候,我们需要某个或多个类里的一些方法函数) //将要被聚合的函数 var JSON = { toJsonString: function () { var output = []; for (key in this) { //这里this指代调用者 output.push( 阅读全文
posted @ 2017-10-17 07:40 打静爵 阅读(1031) 评论(0) 推荐(0) 编辑
摘要: function extend(subClass,superClass) { //初始化一个中间空对象,为了转换主父类关系 var F = function() {}; F.prototype = superClass.prototype; //让子类继承F subClass.prototype = new F(); subClass.protot... 阅读全文
posted @ 2017-10-17 07:34 打静爵 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 1: 选择select时,如何触发? 哪种事件? onchange2: 如何获取被选中的option的值 ? selectobj.value3: 动态生成option innerHTML 阅读全文
posted @ 2017-07-28 10:56 打静爵 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 通过obj.style的方式只能取得"内联style"的值,对于<style></style>中的css属性值,则无能为力 。 我们可以用obj.currentStyle,和window.getComputedStyle()来获取 (注意: 只有 IE 和 Opera 支持使用 currentSty 阅读全文
posted @ 2017-07-27 22:10 打静爵 阅读(1231) 评论(0) 推荐(0) 编辑
摘要: 用css3画出气球形状 <style> *{padding:0;margin:0;} body{background: #222;overflow: hidden;} .balloon{ position: absolute; width: 160px; height: 160px; backgro 阅读全文
posted @ 2017-05-17 20:13 打静爵 阅读(644) 评论(0) 推荐(1) 编辑
上一页 1 ··· 3 4 5 6 7