<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>

解决方案 »

  1.   

    加上也没用,FILE控件的VALUE清不掉就没办法
      

  2.   

    <INPUT id="Hidden1" type="hidden" name="Hidden1" runat="server"> //runat="server"这样定根本就没用
      

  3.   

    <INPUT id="Hidden1" type="hidden" name="Hidden1" runat="server"> //runat="server"这样定根本就没用????
    1、runat="server"这样定我可以在后台引用。
    2、这条语言与本题没多大关系。请再帮我想想办法.
    谢谢大家的热情,请再拉兄弟一把。
      

  4.   

    只有模拟了,用模拟按钮的onclick,每次click都可执行函数