1,更改頁面顏色樣式:
<style> table{background:#99ffcc;} th{font-family:隶书;color:#0099ff;} #tr1{background:#00ccff;} .td1{color:#009999;} a{color:#ff9900;} </style>
#執行如下:
#2,更改滑鼠觸碰顯示效果:
echo "<tr id='tr1'onmouseOver='overTr(this)'onmouseOut='outTr(this)'>";echo "<th onmouseOver='overTr(this)'onmouseOut='outTr(this)'>日</th>";
echo "<th onmouseOver='overTh(this)' onmouseOut='outTh(this)'><a href='?convert=$ymd'>{$d}</a></th>";
echo "<tr onmouseOver='overTr(this)'onmouseOut='outTr(this)'><td colspan='7'align='center'>";
echo "<tr onmouseOver='overTr(this)'onmouseOut='outTr(this)'><td colspan='7' align='center'>";
<script type='text/JavaScript'>
var oriCol=null;function overTr(obj){
oriCol=obj.bgColor;obj.bgColor='#0f0';
}
function outTr(obj){
obj.bgColor=oriCol;
}
function overTh(obj)
{
oriCol=obj.bgColor;
obj.bgColor='red';
}
function outTh(obj){
obj.bgColor=oriCol;
}
</script>