教程网3月28日整理
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript">
<!--
function changeImage(obj)
{
var imgurl = 'face' + obj.value + '.jpg';
document.getElementById('icon').src = imgurl;
document.getElementById('debug').innerHTML = '<-- url: ' + imgurl;
}
//-->
</script>
</head>
<body>
<select onchange="changeImage(this);">
<option value="0" selected>default</option>
<option value="1">aaa</option>
<option value="2">bbb</option>
<option value="3">ccc</option>
</select>
<img id="icon" src="" />
<span id="debug"></span>
</body>
</html>
Javascript教程