06 2015 档案

JavaScript-tips
摘要:getElementsByTagName(“x”)xx.getAttribute(“y”) //xx元素的y属性xx.lastChild.nodeValue //获得xx的文本内容document.createElement(“xx”) //创建xx元素document.createTextNode... 阅读全文

posted @ 2015-06-30 09:52 xiaoshan_coding 阅读(163) 评论(0) 推荐(0)

CSS-tips
摘要:Display:inline //列表项从纵到横Display:block //让元素独占一行,从横到纵Display:none //消失,但仍然占位display: inline-block; //块级元素实现一行显示,但是div本身未脱离文档流display:inline; //内联元素实现一行... 阅读全文

posted @ 2015-06-30 09:51 xiaoshan_coding 阅读(111) 评论(0) 推荐(0)

伪JS
摘要:很多站点如今使用的伪JS技术,即用JS绑架链接,例如:个人认为应该使用常规链接,然后再通过JavaScript去拦截默认的操作。这样即使JS不可用,也不影响页面正常跳转。 阅读全文

posted @ 2015-06-24 22:43 xiaoshan_coding 阅读(121) 评论(0) 推荐(0)

JavaScript-AJAX tips
摘要:ajax对xml文档的处理var request=new window.XMLHttpRequest(); //for chrome browser, 并且不能记载本地file://文档,需通过服务器加载。var request=new XMLHTTPRquest(); //for IE brows... 阅读全文

posted @ 2015-06-24 22:20 xiaoshan_coding 阅读(171) 评论(0) 推荐(0)

AngularJS tips-2 初始篇
摘要:1var phonecatApp = angular.module('phonecatApp', []); //在js中创建自定义模块phonecatApp根模块,在加载。2phonecatApp.controller('PhoneListCtrl', function($scope) {} //在... 阅读全文

posted @ 2015-06-24 16:26 xiaoshan_coding 阅读(143) 评论(0) 推荐(0)

AngularJS tips-1 安装篇
摘要:upm+AngularJS(angular-phonecat)+node.js安装UPM时注意在phonecat/bower将angular版本号写死,如:"angular": "1.3.16",否则报错:ECONFLICT: unable to find suitable version for ... 阅读全文

posted @ 2015-06-24 11:02 xiaoshan_coding 阅读(197) 评论(0) 推荐(0)

cool jQuery tips
摘要:$().slideToggle("slow/fast") //move the object$().animate({,}) //cool animation tool function$().stop()$().hide(100,callback) //attribute to start aft... 阅读全文

posted @ 2015-06-23 22:38 xiaoshan_coding 阅读(107) 评论(0) 推荐(0)

导航