摘要:getElementsByTagName(“x”)xx.getAttribute(“y”) //xx元素的y属性xx.lastChild.nodeValue //获得xx的文本内容document.createElement(“xx”) //创建xx元素document.createTextNode...
阅读全文
摘要:Display:inline //列表项从纵到横Display:block //让元素独占一行,从横到纵Display:none //消失,但仍然占位display: inline-block; //块级元素实现一行显示,但是div本身未脱离文档流display:inline; //内联元素实现一行...
阅读全文
摘要:很多站点如今使用的伪JS技术,即用JS绑架链接,例如:个人认为应该使用常规链接,然后再通过JavaScript去拦截默认的操作。这样即使JS不可用,也不影响页面正常跳转。
阅读全文
摘要:ajax对xml文档的处理var request=new window.XMLHttpRequest(); //for chrome browser, 并且不能记载本地file://文档,需通过服务器加载。var request=new XMLHTTPRquest(); //for IE brows...
阅读全文
摘要:1var phonecatApp = angular.module('phonecatApp', []); //在js中创建自定义模块phonecatApp根模块,在加载。2phonecatApp.controller('PhoneListCtrl', function($scope) {} //在...
阅读全文
摘要:upm+AngularJS(angular-phonecat)+node.js安装UPM时注意在phonecat/bower将angular版本号写死,如:"angular": "1.3.16",否则报错:ECONFLICT: unable to find suitable version for ...
阅读全文
摘要:$().slideToggle("slow/fast") //move the object$().animate({,}) //cool animation tool function$().stop()$().hide(100,callback) //attribute to start aft...
阅读全文