WEB开发网
开发学院网页设计JavaScript js怎样实现下拉框改变,它旁边的图像也改变 阅读

js怎样实现下拉框改变,它旁边的图像也改变

 2010-09-14 13:28:55 来源:WEB开发网   
核心提示:运行可以看到效果<select id="s1" onchange='document.getElementById("pic").src=this.value'><option value=http://tech.ddvip.com/2008-1

运行可以看到效果

<select id="s1" onchange='document.getElementById("pic").src=this.value'>
<option value=http://tech.ddvip.com/2008-12/"/upload/20080918164946929.gif">biggrin</option>
<option value="/upload/20080918164946913.gif">confused</option>
<option value="/upload/20080918164946995.gif">cool</option>
<option value="/upload/20080918164946667.gif">eek</option>
<option value="/upload/20080918164946725.gif">frown</option>
<option value="/upload/20080918164946792.gif">han</option>
<option value="/upload/20080918164946356.gif">mad</option>
<option value="/upload/20080918164946762.gif">redface</option>
<option value="/upload/20080918164946633.gif">rolleyes</option>
<option value="/upload/20080918164946854.gif">smile</option>
<option value="/upload/20080918164947307.gif">tongue</option>
<option value="/upload/20080918164947238.gif">wink</option>
</select>
<img id="pic" src=http://tech.ddvip.com/2008-12/"/upload/20080918164946929.gif" border="0" width="15">

Tags:js 怎样 实现

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接