给聚划算后端开发的前端培训
- 7. HTML: Hypertext Markup Language<!DOCTYPE html><html><head> <meta charset=“gbk” /> <title>标题</title></head><body> <h1>Hello, world!</h1> <p>The quick brown fox jumps over the lazy dog</p></body></html>
- 33. 闭包function main(links) { for (var i=0; i<links.length; i++) { links[i].onclick = function(i) { alert(i); }};main(document.getElementsByTagName("a"));function main(links) {for (var i=0; i<links.length; i++) {links[i].onclick = (function(i) {return function() {alert(i); }})(i); }};main(document.getElementsByTagName("a"));
- 34. prototypefunction Boy(name){this.name = name;}Boy.prototype.type = ‘people’;varetai = new Boy(‘etai’);http://www.ruanyifeng.com/blog/2011/06/designing_ideas_of_inheritance_mechanism_in_javascript.html
- 56. var el = KISSY.Dom.get(‘#id’);el.css(‘color’,’#000’);KISSY.Event.on(el, ‘click’, function(){ alert(‘clicked!’)})
- 70. 标签规范层次对应 <div> <strong></strong> </div>标签、属性小写闭合 <input value=/slideshow/ss-8862190/8862190/“” /> <br /> <imgsrc=/slideshow/ss-8862190/8862190/“” />细致!
- 71. id/class/name命名 id命名唯一JS Hook: <div class=“J_AHook”>…</div>form <input name=/slideshow/ss-8862190/8862190/“”id=/slideshow/ss-8862190/8862190/“” />