一个页面用来显示一个商品的详细信息,怎么实现上传图案片并显示的代码啊?
我用的是
<img id="imgid" src="<?php echo $rs2['proImage'] ?>"/>
<input type="file" name="proImage" id="proImage" value="<?php echo $rs2['proImage'] ?>" onchange="document.getElementById('imgid').src=getFullPath(this);" />
但是有错误啊
我用的是
<img id="imgid" src="<?php echo $rs2['proImage'] ?>"/>
<input type="file" name="proImage" id="proImage" value="<?php echo $rs2['proImage'] ?>" onchange="document.getElementById('imgid').src=getFullPath(this);" />
但是有错误啊
{
if(obj)
{
//ie
if (window.navigator.userAgent.indexOf("MSIE")>=1)
{
obj.select();
return document.selection.createRange().text;
}
//firefox
else if(window.navigator.userAgent.indexOf("Firefox")>=1)
{
if(obj.files)
{
return obj.files.item(0).getAsDataURL();
}
return obj.value;
}
return obj.value;
}
}