代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Page</title>
<script language="javascript">
function ChangeImage()
{
document.getElementById("imageid").src = document.getElementById("fileid").value;
}
</script>
</head>
<body>
<input type="file" id="fileid" onchange="ChangeImage()" />
<img id="imageid" src=""/>
</body>
</html> 我想问的问题是: 在VS2008中.新建一个htm页面.代码如上.图片为什么显示不出来? 如果我把整个htm页面.复制到桌面.然后运行.却能正常显示图片.实现图片预览功能! 问题出在哪?(在线求解.谢谢啦)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Page</title>
<script language="javascript">
function ChangeImage()
{
document.getElementById("imageid").src = document.getElementById("fileid").value;
}
</script>
</head>
<body>
<input type="file" id="fileid" onchange="ChangeImage()" />
<img id="imageid" src=""/>
</body>
</html> 我想问的问题是: 在VS2008中.新建一个htm页面.代码如上.图片为什么显示不出来? 如果我把整个htm页面.复制到桌面.然后运行.却能正常显示图片.实现图片预览功能! 问题出在哪?(在线求解.谢谢啦)
当加到vs2008 website之后,运行此页面就只能浏览本站的图片或互联网上开放的图片。
所以,你如果想要预览的效果,需将它上传,然后用此浏览
另外,非IE浏览器根本无法直接使用的