frank oo java

我爱oo,我爱java。http://oofrank.blogchina.com

My Links

Blog统计

公告

欢迎到 oofrank@blogchina 来 QQ:421057986 email:oofrank@163.com
www.flickr.com
oofrank@flickr with my S9500

Free Download Manager
Free Download Manager

文章

收藏

相册

IT

other

存档


正在读取评论……

js

ff2.0也支持document.all了
<script>
        document.write(document.all)
</script>

[object HTML document.all class]
昨天改js 突然发现firefox2.x 已经支持 document.all 了。

可以使用 document.all,*** 的方式访问 id=*** 的DomElement, 呵呵
大家不要用 document.all判断浏览器类型了啊。

发表于 @ 2007年03月21日 11:27 AM | 评论 (1)

推荐开源 webfx

    摘要:一系列很好的 widgets:comboBox,chart,Grid,Tree,Menu
比dojo要轻便  遵循Apache或MIT Lisence。


openfans
    (全文共177字)——点击此处阅读全文

发表于 @ 2007年03月14日 9:15 AM | 评论 (0)

dojo 0.41 新功能

    摘要:demo

看看demo,支持FF1.5+和IE 的图形库API dojo.gfx

另外还多了进度条等多个 widget。    (全文共164字)——点击此处阅读全文

发表于 @ 2007年03月08日 3:18 PM | 评论 (0)

HTML固定表头Table 简单实现

    摘要: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字)——点击此处阅读全文

发表于 @ 2006年11月04日 6:15 AM | 评论 (0)

使用RICO CORNER时碰到的一个问题

当我使用 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"});

发表于 @ 2006年08月14日 12:51 PM | 评论 (3)

使用Class特性 应用两个css风格

<style>
    .a {color:red;}
    .b {font-size:16pt; }
</style>

<p class="a b">hello css:a&nbsp;b</p>
<p class="a">hello css:a</p>
<p class="b">hello css:b</p>
<p>hello css:&nbsp</p>


使用一个空格就可以让 一个html element拥有两个css style 呵呵,今天才知道,其实IE5就有这个特性了。firefox也支持。

发表于 @ 2005年10月20日 7:15 PM | 评论 (0)

推荐一个 ECMAScript 的 java 开源实现 (javascript on java).

    摘要:有用处的    (全文共102字)——点击此处阅读全文

发表于 @ 2005年10月09日 10:15 AM | 评论 (0)

在IE中使用ActiveX控件









几点提醒:

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时不能进行客户端文件操作,不知道怎样设权限那位可以帮帮忙呀!

发表于 @ 2005年06月23日 6:32 PM | 评论 (0)

兼容IE&Firefox的两个功能模块[收集、改编]
添加到收藏夹:
<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来引用事件对象.


发表于 @ 2005年03月31日 10:38 AM | 评论 (0)

meta标签的使用方法[转帖]
今天有人提起Meta的用法,于是找了一下。从“无尽的任务” http://www.day8.com.cn/web/icesco/找了一片文字。
蓝色的字是我加的 :).

meta是用来在HTML文档中模拟HTTP协议的响应头报文。meta 标签用于网页的<head>与</head>中,meta 标签的用处很多。meta 的属性有两种:name和http-equiv。name属性主要用于描述网页,对应于content(网页内容),以便于搜索引擎机器人查找、分类(目 前几乎所有的搜索引擎都使用网上机器人自动查找meta值来给网页分类)。这其中最重要的是description(站点在搜索引擎上的描述)和 keywords(分类关键词),所以应该给每页加一个meta值。比较常用的有以下几个:

  name 属性

  1、<meta name="Generator" contect="">用以说明生成工具(如Microsoft FrontPage 4.0)等;

  2、<meta name="KEYWords" contect="">向搜索引擎说明你的网页的关键词;

  3、<meta name="DEscription" contect="">告诉搜索引擎你的站点的主要内容;

  4、<meta name="Author" contect="你的姓名">告诉搜索引擎你的站点的制作的作者;

  5、<meta name="Robots" contect= "all|none|index|noindex|follow|nofollow">

  其中的属性说明如下:

  设定为all:文件将被检索,且页面上的链接可以被查询;

  设定为none:文件将不被检索,且页面上的链接不可以被查询;

  设定为index:文件将被检索;

  设定为follow:页面上的链接可以被查询;

  设定为noindex:文件将不被检索,但页面上的链接可以被查询;

  设定为nofollow:文件将不被检索,页面上的链接可以被查询。

  http-equiv属性

  1、<meta http-equiv="Content-Type" contect="text/html";charset=gb_2312-80">

和 <meta http-equiv="Content-Language" contect="zh-CN">用以说明主页制作所使用的文字以及语言;

  又如英文是ISO-8859-1字符集,还有BIG5、utf-8、shift-Jis、Euc、Koi8-2等字符集;

  2、<meta http-equiv="Refresh" contect="n;url=http://yourlink">定时让网页在指定的时间n秒内,跳转到页面 http://yourlink
              去掉url=http://yourlink,默认是刷新当前页

  3、<meta http-equiv="Expires" contect="Mon,12 May 2001 00:20:00 GMT">可以用于设定网页的到期时间,一旦过期则必须到服务器上重新调用。需要注意的是必须使用GMT时间格式; contect="0" 意思是立即过期.

  4、<meta http-equiv="Pragma" contect="no-cache">是用于设定禁止浏览器从本地机的缓存中调阅页面内容,设定后一旦离开网页就无法从Cache中再调出;

   5、<meta http-equiv="set-cookie" contect="Mon,12 May 2001 00:20:00 GMT">cookie设定,如果网页过期,存盘的cookie将被删除。需要注意的也是必须使用GMT时间格式;

  6、<meta http-equiv="Pics-label" contect="">网页等级评定,在IE的internet选项中有一项内容设置,可以防止浏览一些受限制的网站,而网站的限制级别就是通过meta属性来设置的;

  7、<meta http-equiv="windows-Target" contect="_top">强制页面在当前窗口中以独立页面显示,可以防止自己的网页被别人当作一个frame页调用;

   8、<meta http-equiv="Page-Enter" contect="revealTrans(duration=10,transtion= 50)">和<meta http-equiv="Page-Exit" contect="revealTrans(duration=20,transtion=6)">设定进入和离开页面时的特殊效果,这个功能即 FrontPage中的“格式/网页过渡”,不过所加的页面不能够是一个frame页面;
 
       9、<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">防止代理服务器缓存页。

发表于 @ 2005年03月25日 7:03 PM | 评论 (0)

第1页,共2页