
JavaScript
文章平均质量分 75
iteye_1617
这个作者很懒,什么都没留下…
展开
-
jQuery Include HTML、插入html、jquery替代iframe
使用jQuery來達到如iframe、asp include 和 php include 的效果。 而jQuery能做到的比iframe連結另一個網頁html內容來的活用,使用css做樣式變化,也較有彈性。再次比較asp include 和 php include 這樣的方式無須使用以上asp和php伺服器就能達到你想要的include html。下列程式變化更加入了選單(Men...原创 2012-04-16 16:59:46 · 522 阅读 · 0 评论 -
js bind 函数 使用闭包保存执行上下文
转自:http://www.phphubei.com/article-4254-1.htmljs bind 函数 使用闭包保存执行上下文 JAVASCRIPT CODE window.name = "the window object" function scopeTest() { return this.name; ...原创 2012-08-13 15:22:32 · 274 阅读 · 0 评论 -
JS 中 instanceof 和 typeof 的区别
Js中的instanceof和typeof两个经常会搞混,现在就来分析下: 1. instanceof 返回一个Boolean值,指出对象是否是特定类的一个实例。 var s = new String("abc"); console.log(s instanceof String); //true var s = "abc";...原创 2012-08-13 15:34:46 · 173 阅读 · 0 评论 -
JS navigator 对象
JS navigator 对象 转自:http://blog.163.com/tgaosh@126/blog/static/139818624201012651556709/ navigator是一个独立的对象,他用于提供用户所使用的浏览器以及操作系统等信息,以navigator对象属性的形式来提供。-------------------------------------...原创 2012-08-13 15:55:50 · 196 阅读 · 0 评论 -
JS中数组遍历切忌 for in
Array.prototype.test = 'test_prototype';var arr = [1,2,3,4,5,6];for (var i in arr){ console.log(i);}>>0>>1>>2>>3>>4>>5>>test原创 2013-06-07 11:18:20 · 213 阅读 · 0 评论 -
Flex与 JS 交互通信方法
http://www.gnria.com/flex/flex-to-js.html原创 2012-05-20 11:35:21 · 151 阅读 · 0 评论 -
Webgl开发技巧汇总
1、限制最小值 var random = Math.random()*100;// 限制最小时间为3000msvar time = Math.max(3000,(random*40)); 2、将HTML元素做为材质对象使用 var context = canvas.getContext('2d');context.globalAlpha = 1;c...原创 2013-04-23 09:28:28 · 333 阅读 · 0 评论