<script type="text/javascript">
function yanzheng2() { var a=document.getElementById("TextBox1"); if(a.value=="") { alert('请输入购买个数!'); a.focus(); return false; } var b=document.getElementById("FileUpload1"); if(b.value=="") { alert('请选择上传图片!'); b.focus(); return false; } else { var FileName=new String(b.value);//文件名 var extension=new String (FileName.substring(FileName.lastIndexOf(".")+1,FileName.length));//文件扩展名 if(extension=="jpg"||extension=="gif"||extension=="jpeg"||extension=="bmp") {} else { alert('产品图片格式不支持!'); return false; } } var c=document.getElementById("xieyi"); if(c.checked==false) { alert('请查看并同意购买协议!'); c.focus(); return false; } return true; }
</script>
<asp:ImageButton ID="Button1" ImageUrl="~/images/fuwu/tongyii.gif" runat="server" onmousedown="return yanzheng2()" width="90" height="32" onclick="Button1_Click" />
|