<script language="javascript">
function show(myimg)
{
if(myimg.height>110)
{
alert("头像的高度不能大于110");
//加上这一句:
img.src="";
document.Form1.File1.select();
document.execCommand("delete");
return false;
}
if(myimg.width>100)
{
alert("头像的宽度不能大于100");
document.Form1.File1.select();
//加上这一句:
img.src="";
document.execCommand("delete");
return false;
}
document.Form1.Hidden1.value=document.Form1.File1.value;
}
</script>
function show(myimg)
{
if(myimg.height>110)
{
alert("头像的高度不能大于110");
//加上这一句:
img.src="";
document.Form1.File1.select();
document.execCommand("delete");
return false;
}
if(myimg.width>100)
{
alert("头像的宽度不能大于100");
document.Form1.File1.select();
//加上这一句:
img.src="";
document.execCommand("delete");
return false;
}
document.Form1.Hidden1.value=document.Form1.File1.value;
}
</script>
1、runat="server"这样定我可以在后台引用。
2、这条语言与本题没多大关系。请再帮我想想办法.
谢谢大家的热情,请再拉兄弟一把。