我在jsp中使用title属性,如下:
<input name="monitorCellType" type="text" id="monitorCellType" value="<%=dsb.getMonitorCellType()%>" title="<%=dsb.getMonitorCellType()%>" size="10" maxlength="20" height="18">
<input name="monitorCellType" type="text" id="monitorCellType" value="<%=dsb.getMonitorCellType()%>" title="<%=dsb.getMonitorCellType()%>" size="10" maxlength="20" height="18">
这样当鼠标停留在控件上时,能在鼠标旁显示控件内的内容,但是现在有个问题:怎样才能即时显示控件的内容,即只要有修改,在鼠标旁就能看到效果。
解决方法:
title=" " οnmοuseοver="this.title = this.value" 即可达到以上效果