ue);
aa.innerText=clipboardData.getData("Text");
}
//-->
</script>
</BODY>//
226.获得对象类型
switch (object.constructor){
case Date:
...
case Number:
...
case String:
...
case MyObject:
...
default:
...
}//
227.图片加载失败时重新加载图片
<img src="aa.gif" onerror="this.src='aa.gif'">//
228.
//font_effect.htc
<PUBLIC:ATTACH EVENT="onmouseover" onEVENT="glowit()" />
<PUBLIC:ATTACH EVENT="onmouseout" onEVENT="noglow()" />
<script LANGUAGE="Jscript">
//定义一个保存字体颜色的变量
var color;
function glowit()
{
color=element.style.backgroundColor;
element.style.backgroundColor='white'
}
function noglow()
{
element.style.backgroundColor=color
}
</script>
//abc.css
tr{behavīor:url(font_effect.htc);}
229.可以通过css和htc改变表格的颜色,仅IE支持
//xxx.html
<link rel="stylesheet" type="text/css" href="abc.css">
<TABLE border='1' id="a1">
<TR style="background-color:red">
<TD>1</TD>
<TD>2</TD>
<TD>3</TD>
</TR>
<TR style="background-color:yellow">
<TD>4</TD>
<TD>5</TD>
<TD>6</TD>
</TR>
</TABLE>//
230.在页面上画点
function a(x,y,color)
{
document.write("<img border='0' style='position: absolute; left: "+(x+20)+"; top:
"+(y+20)+";background-color: "+color+"' width=1 height=1>")
}//
231.自动关闭网页
<script LANGUAGE="javascript">
<!--
setTimeout('window.close();', 10000); //60秒后关闭
// -->
</script>
<p align="center">本页10秒后自动关闭,请注意刷新页面</p>