<script>
document.write(document.all)
</script>
[object HTML document.all class]
昨天改js 突然发现firefox2.x

已经支持 document.all 了。
可以使用 document.all,*** 的方式访问 id=*** 的DomElement, 呵呵
大家不要用 document.all判断浏览器类型了啊。
摘要:一系列很好的 widgets:comboBox,chart,Grid,Tree,Menu
比dojo要轻便 遵循Apache或MIT Lisence。
openfans
(全文共177字)——点击
此处阅读全文
摘要:
demo看看demo,支持FF1.5+和IE 的图形库API dojo.gfx
另外还多了进度条等多个 widget。 (全文共164字)——点击
此处阅读全文
摘要:IE:
<div style="height: 250px; overflow: auto;">
<table border=1>
<tr style="background-color:red;position:relative;top:expression(this.offsetParent.scrollTop);">
<th>
head
</th>
</tr>
。。 (全文共1178字)——点击
此处阅读全文
当我使用 RICO 的CORNER 时,发现一个小问题,当我的DIV的 background-color: 是 red、green等格式而非 #FF06BF 格式时:使用
Rico.Corner.round('mydiv');
不起作用,
即 <div id="mydiv" style="background-color:green;width:200px;" align="center">
Some Text
</div> 时 不能只用
Rico.Corner.round('mydiv');
而要用
Rico.Corner.round('mydiv', {color:"transparent"});
<style>
.a {color:red;}
.b {font-size:16pt; }
</style>
<p class="a b">hello css:a b</p>
<p class="a">hello css:a</p>
<p class="b">hello css:b</p>
<p>hello css: </p>
使用一个空格就可以让 一个html element拥有两个css style 呵呵,今天才知道,其实IE5就有这个特性了。firefox也支持。
几点提醒:
1、classid=CLSID:3A2B370C-BA0A-11D1-B137-0000F8753F5D 指定ActiveX控件
2、传递参数也可以使用 <param value="" name="" />
3、使用
o1.attachEvent("KeyDown",doTest);捕获事件
4、使用
o1.object引用ActiveX对象自身
另外,我在.NET下使用IE装载Window control时不能进行客户端文件操作,不知道怎样设权限那位可以帮帮忙呀!
添加到收藏夹:
<html>
<head>
<title>bookmark</title>
<script type="text/javascript">
//<![CDATA[
function bookmark(anchor){
if(window.external)
{
window.external.AddFavorite(anchor.getAttribute('href'), anchor.getAttribute('title'));
return false;
}
return true;
}
//]]>
</script>
</head>
<body>
<a href="http://www.google.com/" rel="sidebar" title="Google" onclick="return bookmark(this)">Bookmark</a>
</body>
</html>
在 <a> 中设置rel属性为 sidebar 可以在firefox中实现添加到收藏夹的功能,其中title属性值是默认书签名,href是书签地址(内容)。
============================================================
============================================================
事件处理:
<script>
if(window.addEventListener)
{
FixPrototypeForGecko();
}
function FixPrototypeForGecko()
{
HTMLElement.prototype.__defineGetter__("runtimeStyle",element_prototype_get_runtimeStyle);
window.constructor.prototype.__defineGetter__("event",window_prototype_get_event);
Event.prototype.__defineGetter__("srcElement",event_prototype_get_srcElement);
}
function element_prototype_get_runtimeStyle()
{
//return style instead...
return this.style;
}
function window_prototype_get_event()
{
return SearchEvent();
}
function event_prototype_get_srcElement()
{
return this.target;
}
function SearchEvent()
{
//IE
if(document.all)
return window.event;
func=SearchEvent.caller;
while(func!=null)
{
var arg0=func.arguments[0];
if(arg0)
{
if(arg0.constructor==Event)
return arg0;
}
func=func.caller;
}
return null;
}
</script>
<button onclick="alert(event.clientX)">OK</button>
将以上代码copy到你的页面中,则可以在firefox的js函数中直接使用event来引用事件对象.