1. Change the page all <a href, request target is _blank, new open a window
<style>
A
{
Target:expression (this.target= "_blank");
}
</style>
2. Eliminate links on the page dashed box
<style type= "Text/css" >
A {star:expression (Onfocus=this.blur)}
</style>
3. Using CSS custom attribute expression to bulk define table row interval background
<style type= "Text/css" >
tr{background-color:expression (' #F8F8F8, #EFEFEF '. Split (', ') [rowindex%2]);}
</style>
4. Control the alignment of the table
Define a pseudo-class in CSS:
. mytablecenter{myalign:expression (this.align= "right");}
Refer to the. Mytablecenter style in <table>
5. Place the position of an element according to the size of the browser
. MyClass {left:expression (document.body.offsetwidth-110 + "px");}
6. Distinguish a read-only text box
<style>
Input{background-color:expression (this.readonly && this.readonly==true)? " #f0f0f0 ":")}
</style>
<input type= "text" Name= "" >
<input type= "text" Name= "" readonly>
7. Replace the image CSS
The #imgScript {/* Here uses the object ID to pass the style, or you can define a CSS function */
Star:expression (
onmouseover = function ()
{
/* Replace picture */
if (this.hover! = null) {
THIS.name = THIS.SRC;
THIS.SRC = this.src= "/files/beyondpic/2006-5/29/0652912505890151.jpg", ' _over.jpg ');
This. HASCHG = 1;
}
},
onmouseout = function ()
{
/* Restore the original picture */
if (this. Haschg! = null) {
THIS.SRC = THIS.name;
This. HASCHG = null;
}
}
)
}