<html>
<body>
<table cellpadding="2" width="226" cellspacing="2" border="0"  >
        <tr> 
          <td width="32" align="right"><img id=idface src="../../../free/guestbook/images/1.gif" alt=个人形象代表 width="32" height="32"></td>
          <td width="30" ><font class=cha2>头像</font></td>
          <td width="69"> 
            <select class=editbox1 onChange="document.images['idface'].src=options[selectedIndex].value;">
              <option value=/free/guestbook/images/1.gif selected>头像1</option>
              <option value=/free/guestbook/images/2.gif select>头像2</option>
   </select>
          </td>
          <td width="69">--&gt; 静态</td>
        </tr>
      </table>
      </body>
      </html>

解决方案 »

  1.   

    <select name="select7" size="1" onChange="document.images['face'].src=options[selectedIndex].value;">
                  <option selected value="image/face/1.bmp">男孩1 
                  <option selected value="image/face/1.bmp">男孩2
                  <option selected value="image/face/1.bmp">男孩3
    </select>
     <img id=face src="image/face/1.bmp" alt=个人形象代表>
      

  2.   

    楼上的,多谢了,这个语法是什么意思?
    onChange="document.images['idface'].src=options[selectedIndex].value;">
      

  3.   

    就是当onChange时,把图片的连接改为当前option的值
      

  4.   

    <html>
    <body>
    <table cellpadding="2" width="226" cellspacing="2" border="0"  >
            <tr> 
              
    <td width="150" height="32">形象 <img id="face" src="<%=face%>" alt="个人形象代表"><span class="red">**</span></td>
                <td height="32"> 
                  <select name="face" size="1" onChange="document.images['face'].src=options[selectedIndex].value;" style="BACKGROUND-COLOR: #cccccc; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000">
                    <%
                    dim faceName,selected
                    for i=1 to 24
                    faceName = ""
                    faceName = "images/face/" & right("00" & i,2) & ".gif"
                    selected = ""
                    if faceName = face then selected = "selected"
                    %>
                    <option value="<%=faceName%>" <%=selected%>>Image<%=i%></option>
                    <%
                    next
                    %>
                  </select>
    </td>
    </tr>
    </table>
    </body>
    </html>