等老师的指点!
多谢1!!··!
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>---</title>
<script language="javascript">
<!--
function ChoiceCloseButton(CloseButton){
CloseImg.src = CloseButton;
}
//-->
</script>
</head>
<body bgcolor="#D4D0C8">
<select name="select" onchange="ChoiceCloseButton(options[selectedIndex].value);">
<option value="Image/close1.gif">默认</option>
<option value="Image/close2.gif">1</option>
<option value="Image/close3.gif">2</option>
</select>
<img id="CloseImg" src="Image/close1.gif" width="14" height="14" alt="" style="cursor:hand;" align="absmiddle" onclick="Label.style.display='none';ShowLabel.disabled=false;"/>
</body>
</html>
[CODE]
<form>
<select name="image" onChange="preview(this)">
<option value="">选择图片</option>
<option value="http://hacker365.com/bbs/UploadFace/1521_200461415355667121.gif">icecool</option>
<option value="http://www.bc-cn.net/bbs/Images/userface/image19.gif">阳光白雪</option>
<option value="http://www.fangxuela.com/img/tx/004.gif">盖茨他爹</option>
</select>
</form>
<span id="preview"></span>
<script>
function preview(image) {
var src = image.value;
var tar = document.getElementById('preview');
var html = "<img src=\""+src+"\">";
tar.innerHTML = html;
}
</script>
[/CODE]
[此贴子已经被作者于2006-5-26 8:50:40编辑过]
呵呵
又是七楼的老师帮了我大忙,再此谢谢老师了!
但有一段代码我看不懂哦!
var tar = document.getElementById('preview');
还请老师指点!