zhangyi979906 2017-10-02 03:19 采纳率: 0%
浏览 720

JSPselect动态改变图片加载不了,求助

<!DOCTYPE html>


register.html
<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="this is my page">
<meta name="content-type" content="text/html; charset=gbk">


<br> #contain{<br> width:600px;<br> height:400px; <br> margin:auto;<br> margin-top:50px;<br> }<br> table{<br> margin:auto;<br> border:1px solid blue;<br> }<br> th{<br> background-color:blue;<br> }<br>


<br> function check(){<br> if(document.getElementById(&quot;name&quot;).value==&quot;&quot;){<br> alert(&quot;请输入用户名!&quot;);<br> document.getElementById(&quot;name&quot;).focus();<br> return false;<br> }<br> if(document.getElementById(&quot;password&quot;).value==&quot;&quot;){<br> alert(&quot;请输入密码!&quot;);<br> document.getElementById(&quot;password&quot;).focus();<br> return false;<br> }<br> if(document.getElementById(&quot;password1&quot;).value==&quot;&quot;){<br> alert(&quot;请输入确认密码&quot;);<br> document.getElementById(&quot;password1&quot;).focus();<br> return false;<br> }<br> if(document.getElementById(&quot;password&quot;).value!=document.getElementById(&quot;password1&quot;).value){<br> alert(&quot;两次密码不一致!&quot;);<br> document.getElementById(&quot;password&quot;).focus();<br> return false;<br> }<br> var re = /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/; <br> if(!re.test(document.getElementById(&quot;email&quot;).value)){<br> alert(&quot;邮箱格式不正确&quot;);<br> document.getElementById(&quot;email&quot;).focus();<br> return false;<br> }<br> }<br> function setBeerIcon(){<br> var beerIcon=document.getElementById(&quot;beerIcon&quot;);<br> beerIcon.src=&quot;images/&quot;+getSelectValue(&quot;beer&quot;)+&quot;.jpg&quot;</p> <pre><code> } </code></pre> <p>














用户注册
用户名: *
头像:
                    <select id="beer" name="beer" onChange="setBeerIcon()"  >
                        <option value="1" >1</option>
                        <option value="2" >2</option>
                    </select>
                    <img border="0" src="1.jpg" alt="brand"  id="brandIcon" style="width:50px">
                </td>
            </tr>
            <tr>
                <td height="40" >密码:</td>
                <td><input type="password" name="password" id="password"><span style="color: red">*</span></td>
            </tr>
            <tr>
                <td height="40">确认密码:</td>
                <td><input type="password" name="password1" id="password1"><span style="color:red">*</span></td>
            </tr>
            <tr>
                <td height="40">电子邮箱:</td>
                <td><input type="text" name="email" id="email"><span style="color:red">*</span></td>
            </tr>
            <tr>
                <td></td>
                <td><input type="submit" value="提交"><input type="reset" ><a href="#">点此登录</a></td>
            </tr>
        </tbody>
        </table>
    </form>
</div>


  • 写回答

1条回答 默认 最新

  • devmiao 2017-10-02 05:58
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作