在下拉列表框选择哪个图片就能出现哪个图片怎么弄啊

来源:百度知道 编辑:UC知道 时间:2024/05/22 12:52:08
<select><option select value="boy">boy</option>
<option select value="girl">girl</option>
</select>
<img src="">
应该怎么写啊

<form name="form1">
<select onchange="this.document.form1.pic.value=this.options[this.selectedIndex].value);">
<option select value="boy">boy</option>
<option select value="girl">girl</option>
</select>
<img name="pic" src="">
</form>

我给你简单做了一个例子,
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<table width="488" height="344" border="1">
<tr>
<td> </td>
<td><select name="select" onChange="image(this.value);">
<option value="pic1.jpg">picture1</option>
<option value="pic2.jpg">