摘要: var str = " Hello World "; str.toUpperCase();//将字符串转换为大写 str.toLowerCase();//将字符串转换为小写 str.indexOf("World");//若索引的字符串存在 则返回首字母索引位置 否则返回-1 若索引字符串为"" 则返 阅读全文
posted @ 2019-11-19 21:03 猫狗日记 阅读(404) 评论(0) 推荐(0) 编辑
摘要: //函数 function //方法 method 匿名函数 var a = function(){ alert("我是匿名函数"); } function attack(attackmode){ attackmode(); alert("掉血"); } ··attack(function (){a 阅读全文
posted @ 2019-11-19 20:50 猫狗日记 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 字符串 string // "Hello World" 数字 number // 100 -100 100.23 -62.55 布尔 boolean // true false 数组 array 对象 object null 空 未定义 undefined 阅读全文
posted @ 2019-11-19 20:44 猫狗日记 阅读(111) 评论(0) 推荐(0) 编辑
摘要: JQuery语法: 基础语法:$(selector).action() 美元符号定义JQuery 选择符(selector) "查询"和"查找"HTML元素 JQuery的action()执行对元素的操作 例如: $(this).hide() 隐藏当前元素 $("p").hide() 隐藏所有段落 阅读全文
posted @ 2019-11-19 19:14 猫狗日记 阅读(66) 评论(0) 推荐(0) 编辑