<html>
<head>
<script type="text/javascript">
function Se(){
document.getElementById('bgs').src="bgs/"+document.getElementById('pinming').value+".jpg";}
</script>
</head>
<body>
<div><table>
<tr><td>品名批号:<label for="pinming"></label>
<input name="pinming" type="text" id="pinming" />
<input name="chaxun" type="button" id="chaxun" value="查询" onclick="Se()" />
</td></tr>
<tr><td>
<img name="bgs" width="1272" height="1740" id="bgs" />
</td></tr>
</table>
</div>
</body>
</html>
代码如上,就是根据输入的文件名,然后显示图片,图片位置都是固定的,含有中文就显示不了,不含有中文就可以显示。求大神!