摘要: 上面代码原意是希望将生成的button元素,绑定相对应的p元素,但是运行后发现所有的button元素都绑定了最后一个p元素。 为什么? 这是因为onclick事件绑定的函数的词法环境(作用域)都是for循环花括号区域,区域中有p,b,i三个变量。 而b.onclick = function(){}和 阅读全文
posted @ 2018-03-23 13:50 web_小隆 阅读(438) 评论(0) 推荐(0) 编辑
摘要: 一 本地跨域 提示错误:Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. 我直接双击打开index.html使用的时,使用的是file 阅读全文
posted @ 2018-03-22 22:12 web_小隆 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 参考:java中bit的常用操作技巧 https://blog.csdn.net/wodeyuer125/article/details/45100319 阅读全文
posted @ 2018-03-22 21:44 web_小隆 阅读(4673) 评论(0) 推荐(0) 编辑