<script type="text/javascript">
document.getElementById('x').style.background="url(" + bg + ")"
<p>把鼠标移动到这两幅图像上,输入框会获得一幅背景图像。</p>
<table width="300" height="100">
<td onmouseover="bgChange('/img/eg_bg_08.gif')"
background="/img/eg_bg_08.gif">
<td onmouseover="bgChange('/img/eg_bg_09.gif')"
background="/img/eg_bg_09.gif">
<input id="x" type="text" value="把鼠标移动到图像上" size="20">