2015年11月26日

JS-小技巧-国家城市联动

摘要: 首先,二维数组存储国家和对应城市,第一个写入国家,随后列上城市名var arr=new array(4);arr[0]=["china",'beijing','chengdu','wuhan'];arr[1]=["america",'newyork','houston','atlanta'];arr... 阅读全文

posted @ 2015-11-26 22:45 xiaoshan_coding 阅读(375) 评论(0) 推荐(0) 编辑

2015年8月18日

Java-static区域

摘要: 1 class A{ 2 static int a; 3 int b; 4 static{ 5 a++; 6 } 7 A(){ 8 a++; 9 }10 }static{}区域只在class A申明时执行一次。... 阅读全文

posted @ 2015-08-18 15:45 xiaoshan_coding 阅读(182) 评论(0) 推荐(0) 编辑

2015年8月14日

intern cookie 纠结之二

摘要: 1 $.cookie("username","") //设置cookie为空,长度为02 $.cookie("username",null) //设置cookie为"null",但是cookie还是存在,长度为43 $.cookie("username","",{expires:date}) //在... 阅读全文

posted @ 2015-08-14 11:37 xiaoshan_coding 阅读(91) 评论(0) 推荐(0) 编辑

2015年8月10日

intern的项目纠结js里cookie的用法

摘要: cookie有这么几个属性,name,value,expireDate,domain,path项目遇到html/person/person.html设置的cookie无法从html/alipay/pay.asp中读出结果:cookie的路径问题,person.html默认的path是自己的路径,想要... 阅读全文

posted @ 2015-08-10 23:59 xiaoshan_coding 阅读(172) 评论(0) 推荐(0) 编辑

2015年6月30日

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 阅读(157) 评论(0) 推荐(0) 编辑

CSS-tips

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

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

2015年6月24日

伪JS

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

posted @ 2015-06-24 22:43 xiaoshan_coding 阅读(116) 评论(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 阅读(163) 评论(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 阅读(140) 评论(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 阅读(192) 评论(0) 推荐(0) 编辑

导航