JQuery-Ajax

摘要: /* * 0. $.ajax() * $('#btn').click(function(){ var data = $('input[name=go]').val(); $.ajax({ url: "ajax.php", ... 阅读全文
posted @ 2016-04-23 13:23 碧玉疾风丶 阅读(107) 评论(0) 推荐(0) 编辑

JQuery-属性

摘要: // attr能访问到的都是html里面的样式,诸如内联样式.外部样式和外联样式该方法访问不到 $('#div1').width('400px') // 这个用来改样式css $("#div1").attr({ width: "400px"}); console.log( $('#div1').attr('widt... 阅读全文
posted @ 2016-04-22 00:14 碧玉疾风丶 阅读(102) 评论(0) 推荐(0) 编辑

JQuery-筛选

摘要: /* 六丶筛选 */ // console.log( $("div:first") ); // div#id_1 所有div中的第一个 // console.log( $("div:last") ); // div#id_4 所有div中... 阅读全文
posted @ 2016-04-21 20:40 碧玉疾风丶 阅读(96) 评论(0) 推荐(0) 编辑

JQuery-文档处理&选择器

摘要: ... 第一段.. 第二段.. AAAAAAAAA 12345678906785. /* 五丶文档处理 */ // $('#textDiv').append('--append-... 阅读全文
posted @ 2016-04-21 20:35 碧玉疾风丶 阅读(267) 评论(0) 推荐(0) 编辑

JQuery-事件(部分)

摘要: /* 1. bind跟on是类似的方法,下面示例可相互替换 $('#click1').on('click',toYellow); // click绑定toYellow方法 $('#click1').off/unbind('click',toYellow) // 给click移除... 阅读全文
posted @ 2016-04-21 20:25 碧玉疾风丶 阅读(105) 评论(0) 推荐(0) 编辑

JS中构造函数与函数

摘要: //构造函数中,如果返回的是一个对 象,那么就保留原意. 如果返回的是非对象,比如数字、布尔和字符串,那么就返回 this,如果没有 return 语句,那么也返回this. var myFun1 = function(){ this.name = "LiuYashion1"; self1 = this... 阅读全文
posted @ 2016-04-16 00:37 碧玉疾风丶 阅读(120) 评论(0) 推荐(0) 编辑

JS中的String.Math.Date

摘要: //今天放假没看东西,贴上以前的基础,没事看着玩 // String->-> var myStr = "My name is LiuYashion"; console.log( myStr.length ); //21 console.log( myStr.charAt(0) ... 阅读全文
posted @ 2016-04-15 23:27 碧玉疾风丶 阅读(141) 评论(0) 推荐(0) 编辑

JS中的_proto_(2)

摘要: function God(){} function Foo(){ this.name="Foo~~"; } Foo.prototype = new God(); function Eoo(){ this.sex = "boy"; } Eoo.prototype = new Eoo(); var f1 = new Foo(); console.log(Foo.prot... 阅读全文
posted @ 2016-04-14 23:38 碧玉疾风丶 阅读(227) 评论(0) 推荐(0) 编辑

JS中的_proto_

摘要: var grandfather = function(){ this.name = "LiuYashion" this.age = 23; } var father = function(){}; father.prototype = new grandfather(); //继承父类 father.game = "LOL"; father.protot... 阅读全文
posted @ 2016-04-14 19:59 碧玉疾风丶 阅读(200) 评论(0) 推荐(0) 编辑

JS中的constructor

摘要: // constructor属性始终指向创建当前对象的构造函数。比如下面例子:比如下面例子: //var foo = new Array(1, 56, 34, 12); var arr = [1, 56, 34, 12]; console.log(arr.constructor === Array); // true ... 阅读全文
posted @ 2016-04-13 17:40 碧玉疾风丶 阅读(309) 评论(0) 推荐(0) 编辑