[color=red]使文本框内的文字居中:[/color]
style="text-align: center"
[color=red]强制设置下拉列表框长度:[/color]
<select name="selectObj" title="selectObj" style="width:250px">
</select>
[color=red]设置表格行当鼠标移入时变色,移出行时恢复:[/color]
<TR bgcolor="#ffffff"
onMouseOver="this.style.backgroundColor='#fee5ca'"
onMouseOut="this.style.backgroundColor='#ffffff'">
[color=red]使链接变成按钮:[/color]
<a href="javascript:dispDetail('${returnCard.tid}');" >查看详细</a>
[color=red]设置表格的行高:[/color]
<tr height="10"></tr>或<td height="100"></td>
[color=red]设置表格的单元格为过渡颜色:[/color]
<td style="FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#5AAFE2,endColorStr=#ffffff)"></td>
[color=red]定义一个DIV,固定长和宽,并设置滚动,可把循环的数据在里边输出从而保证页面上某些元素的固定位置:[/color]
<div id="layer" style=" width:90%;position:absolute; height:490px; z-index:1; left: 50px; top: 50px; overflow:auto" >
<c:foreach var="obj" items = "listValue">
....
</c:foreach>
</div>
<center>
<!--下边这三个按钮的位置是固定的-->
<input name="add" type="button" id="add" value="新增">
<input name="edit" type="button" id="edit" value="编辑">
<input name="del" type="button" id="del" value="删除">
</center>
[color=red]用DIV模拟带图片的按钮效果,当鼠标移动到"按钮"上方时,"按钮"背景变色,移出时,"按钮"恢复原背景色[/color]
<div style= "border:1px solid #000000; width:60;height:25" οnclick="clickAdd(this);" id="buttonAdd" onMouseOver="this.style.backgroundColor='#fee5ca'" onMouseOut="this.style.backgroundColor='#ffffff'">
<img src="<%=request.getContextPath()%>/images/add.gif">新增
</div>
<div style= "border:1px solid #000000; width:60;height:25" οnclick="clickEdit(this);" id="buttonEdit" onMouseOver="this.style.backgroundColor='#fee5ca'" onMouseOut="this.style.backgroundColor='#ffffff'">
<img src="<%=request.getContextPath()%>/images/edit.gif">编辑
</div>
<div style= "border:1px solid #000000; width:60;height:25" οnclick="clickSave(this);" id="buttonSave" onMouseOver="this.style.backgroundColor='#fee5ca'" onMouseOut="this.style.backgroundColor='#ffffff'">
<img src="<%=request.getContextPath()%>/images/save.gif">保存
</div>
<div style= "border:1px solid #000000; width:60;height:25" οnclick="clickDel(this);" id="buttonDel" onMouseOver="this.style.backgroundColor='#fee5ca'" onMouseOut="this.style.backgroundColor='#ffffff'">
<img src="<%=request.getContextPath()%>/images/x.gif">删除
</div>
arrayScore[j].readOnly=1;//用JS设置页面文本框为只读状态
arrayScore[j].readOnly=0;;//用JS设置页面文本框为去掉只读状态,注意"readOnly"的大小写
style="text-align: center"
[color=red]强制设置下拉列表框长度:[/color]
<select name="selectObj" title="selectObj" style="width:250px">
</select>
[color=red]设置表格行当鼠标移入时变色,移出行时恢复:[/color]
<TR bgcolor="#ffffff"
onMouseOver="this.style.backgroundColor='#fee5ca'"
onMouseOut="this.style.backgroundColor='#ffffff'">
[color=red]使链接变成按钮:[/color]
<a href="javascript:dispDetail('${returnCard.tid}');" >查看详细</a>
[color=red]设置表格的行高:[/color]
<tr height="10"></tr>或<td height="100"></td>
[color=red]设置表格的单元格为过渡颜色:[/color]
<td style="FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#5AAFE2,endColorStr=#ffffff)"></td>
[color=red]定义一个DIV,固定长和宽,并设置滚动,可把循环的数据在里边输出从而保证页面上某些元素的固定位置:[/color]
<div id="layer" style=" width:90%;position:absolute; height:490px; z-index:1; left: 50px; top: 50px; overflow:auto" >
<c:foreach var="obj" items = "listValue">
....
</c:foreach>
</div>
<center>
<!--下边这三个按钮的位置是固定的-->
<input name="add" type="button" id="add" value="新增">
<input name="edit" type="button" id="edit" value="编辑">
<input name="del" type="button" id="del" value="删除">
</center>
[color=red]用DIV模拟带图片的按钮效果,当鼠标移动到"按钮"上方时,"按钮"背景变色,移出时,"按钮"恢复原背景色[/color]
<div style= "border:1px solid #000000; width:60;height:25" οnclick="clickAdd(this);" id="buttonAdd" onMouseOver="this.style.backgroundColor='#fee5ca'" onMouseOut="this.style.backgroundColor='#ffffff'">
<img src="<%=request.getContextPath()%>/images/add.gif">新增
</div>
<div style= "border:1px solid #000000; width:60;height:25" οnclick="clickEdit(this);" id="buttonEdit" onMouseOver="this.style.backgroundColor='#fee5ca'" onMouseOut="this.style.backgroundColor='#ffffff'">
<img src="<%=request.getContextPath()%>/images/edit.gif">编辑
</div>
<div style= "border:1px solid #000000; width:60;height:25" οnclick="clickSave(this);" id="buttonSave" onMouseOver="this.style.backgroundColor='#fee5ca'" onMouseOut="this.style.backgroundColor='#ffffff'">
<img src="<%=request.getContextPath()%>/images/save.gif">保存
</div>
<div style= "border:1px solid #000000; width:60;height:25" οnclick="clickDel(this);" id="buttonDel" onMouseOver="this.style.backgroundColor='#fee5ca'" onMouseOut="this.style.backgroundColor='#ffffff'">
<img src="<%=request.getContextPath()%>/images/x.gif">删除
</div>
arrayScore[j].readOnly=1;//用JS设置页面文本框为只读状态
arrayScore[j].readOnly=0;;//用JS设置页面文本框为去掉只读状态,注意"readOnly"的大小写