百度首页 | 百度空间
 
文章列表
 
您正在查看 "javascript&web2.0" 分类下的文章

2008年07月05日 星期六 下午 06:24

ir不支持自定义tag,会自己拆成3个node,就是不认识,所以css什么也不能生效,但是比如

<style>blah {color:green}</style>
<script>document.createElement("blah");</script>
<blah>kkkk</blah>

这样,又完全正常,ie的各种行为太多

参见http://ejohn.org/blog/html5-shiv/

类别:javascript&web2.0 | 评论(0) | 浏览()
 
2008年07月02日 星期三 上午 10:21

eval的第二参数介绍写的是context就是with差不多的功能,http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Functions:eval也说with可以代替第二参数,就是说

var ttt={
aaa:123,
bbb:234
}

with(ttt)
{
ccc=aaa;
}


//eval("ccc=aaa",ttt)
alert(ccc)

var ttt={
aaa:123,
bbb:234
}

eval("ccc=aaa",ttt)
alert(ccc)

是一样的,但是下面

var a=(function(){
var a

类别:javascript&web2.0 | 评论(0) | 浏览()
 
2008年06月06日 星期五 下午 02:19

var test=0,ongoing=document.getElementById("task_ongoing"),completed=document.getElementById("task_completed");
function add_test(){
ongoing.innerHTML+="hahaha"+test+++"<br>";

}
function change_complete(){
+function(){completed.appendChild(ongoing.childNodes[0]);return arguments.callee}()()()()
}

类别:javascript&web2.0 | 评论(0) | 浏览()
 
2008年06月01日 星期日 下午 12:09
关于ie跨域首先是安全设置问题,分为本地文件系统,本地intranet和internet,本地系统可以跨域,本地intranet在安全下面的"通过域访问数据源"默认是"提示",而对于internet默认是"禁用"
关于firefox,安全设置更加全面,安全设置可以通过调用netscape.security.PrivilegeManager.enablePrivilege进行修改,PrivilegeManager默认只是对于来自本地文件系统可以调用,firefox安全设置里对于来自web服务器上面的html文件默认来说PrivilegeManager对象是不可访问的,所以,想调整的话,必须在about:config
类别:javascript&web2.0 | 评论(0) | 浏览()
 
2008年05月08日 星期四 下午 01:15

<script>
Object.prototype.lll=1234;
function aaa(){
alert(123456)
}
for (var x in aaa)
{
alert(x)
}
</script>

for循环原始primitive对象,不会循环Function.prototype下面以及Object.prototype下面的基本方法以及属性,所以这很严重

类别:javascript&web2.0 | 评论(0) | 浏览()
 
2008年03月16日 星期日 下午 04:22
ie6的js实现是基于JScript和DOM ActiveX各种分离部件实现的,所以回收内存自然有些问题,下面简单介绍下内存泄漏
例一
Js代码 复制代码
  1. <html>   
  2.      <hea
类别:javascript&web2.0 | 评论(1) | 浏览()
 
2008年01月31日 星期四 下午 08:07
今天偶然看到一段代码(看网站,由于以前职业,成习惯了看下代码)
Java代码 复制代码
  1. $(div).css(   
  2. {   
  3.      border:
类别:javascript&web2.0 | 评论(1) | 浏览()
 
2007年12月06日 星期四 下午 02:58
最近在YUI的2.4更新上终于看到了CSS选择器,很先进的,虽然这是在jQuery Prototype之后实现,但是,也是很好的,可以这样写
var elements = YAHOO.util.Selector.query("#content p.hello");

query

static Array
类别:javascript&web2.0 | 评论(0) | 浏览()
 
2007年11月07日 星期三 下午 07:35
代码
  1. function Y(le) {   
  2.     return function (f) {   
  3.         return f(f);
类别:javascript&web2.0 | 评论(2) | 浏览()
 
2007年11月07日 星期三 上午 00:57

Bug Fixes in JavaScript 2


As the the ECMAScript 4 (JavaScript 2) specification comes closer to its final form, a number of aspects have, already, congealed and able to be disseminated and learned. Specifically, the bug fixes to ECMAScript 3 that are being included in ECMAScript 4 are quite refined at this point.

The

类别:javascript&web2.0 | 评论(2) | 浏览()
 
     
 
 
文章分类
 
 
 
 
工作(21)
 
其他(40)
 
Java(1)
 
 
 
Css(1)
 
     
 
文章存档
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
     
 
最新文章评论
   

onda的n73u全固态
 

上进青年哦。
 

 

听说2010年广州也开免费的。真羡慕。美国Google给开免费的,真羡慕。
 

CPU超到3G了?主板是啥型号的?
 
     


©2008 Baidu