table border边框线虚线 隔行换色onmouse效果 div换色

<script type="text/javascript"> </script>

列1列2列3
112233
112233
112233
112233
11111111111111111111111112222222222222222222222222
aa


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
" http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<style type="text/css">
.a1{ background-color:#B3C1F4; color:#0E30AE}
.a2{ background-color:#EDF1FF; color:#0E30AE}
</style>
<script type="text/javascript">
<!--
function onloadEvent(func){
var one=window.onload
if(typeof window.onload!='function'){
window.οnlοad=func
}
else{
window.οnlοad=function(){
one();
func();
}
}
}
function showtable(){
var tablename=document.getElementById("table1")
var tr1=tablename.getElementsByTagName("tr")
for(var i=1 ;i<tr1.length;i++){
tr1[i].οnmοuseοver=function(){
this.style.fontWeight="bold";
this.style.backgroundColor="red";
}
tr1[i].οnmοuseοut=function(){
this.style.fontWeight=""
this.style.backgroundColor=""
}
if(i%2==0){
tr1[i].className="a1";
}else{
tr1[i].className="a2";
}
}
}
onloadEvent(showtable);
-->
</script>
<body>
<table width="100%" border="0" cellpadding="2" cellspacing="0">
 <tr>
  <td width="100%">
 
  <table border="0" cellpadding="3" cellspacing="1" width="100%" align="center" style="background-color: #b9d8f3;" id="table1">
   <tr style="text-align: center; COLOR: #0076C8; BACKGROUND-COLOR: #F4FAFF; font-weight: bold">
    <td><font size="2">列1</font></td>
    <td><font size="2">列2</font></td>
    <td><font size="2">列3</font></td>
   </tr>
       
   <tr bgcolor='#F4FAFF'>
    <td nowrap="nowrap" align="left">11<font size="2"></td>
    <td align="right"><font size="2">22</font></td>
    <td align="right"><font size="2">33</font></td>
   </tr>
    <tr bgcolor='#F4FAFF'>
    <td nowrap="nowrap" align="left">11<font size="2"></td>
    <td align="right"><font size="2">22</font></td>
    <td align="right"><font size="2">33</font></td>
   </tr>
   <tr bgcolor='#F4FAFF'>
    <td nowrap="nowrap" align="left">11<font size="2"></td>
    <td align="right"><font size="2">22</font></td>
    <td align="right"><font size="2">33</font></td>
   </tr>
   <tr bgcolor='#F4FAFF'>
    <td nowrap="nowrap" align="left">11<font size="2"></td>
    <td align="right"><font size="2">22</font></td>
    <td align="right"><font size="2">33</font></td>
   </tr>
  </table>

  </td>
 </tr>
</table>
<table border="0" cellspacing="1" width="100%">
     <tr>
           <td style="border: 1px dotted #000000">1111111111111111111111111</td>
           <td style="border: 1px dotted #000000">2222222222222222222222222</td>
     </tr>
</table>
<table style="border:dashed 1px #b22e2e">
 <tr><td>aa</td></tr>
</table>
<hr style="border:dashed 1px #b22e2e">
</body>
</html>

 

div换色

 

<html>
<head>
<style>
div{ star : expression(οnmοuseοver=function(){this.style.backgroundColor="#AAFFAA"; οnmοuseοut=function(){this.style.backgroundColor="#FFFFFF";}})}
</style>
</head>
<body>
<div>111</div>
<div>222</div>
<div>333</div>
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值