⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 column.js

📁 用JSP写的一网上书店管理系统. 开源
💻 JS
字号:
function formCheck1(theform)
{
        if (theform.productName.value =="")
        {
			alert("请输入产品名称!");
			theform.productName.focus();
			return false;
        }
        if(theform.marketPrice.value =="")
		{
			 alert("请输入市场价!");
			 theform.marketPrice.focus();
			 return false;
	    }
		 if(theform.marketPrice.value!=""){
		 var Letters = "1234567890.";
		 for (i=0;i<theform.marketPrice.value.length;i++)
		   {
			  var CheckChar = theform.marketPrice.value.charAt(i);
			  if (Letters.indexOf(CheckChar) == -1){
				  alert("请输入合法的市场价!");
				  theform.marketPrice.focus();
				  return false;
				  }
  			 } 
		 }
		 if(theform.preferPrice.value ==""){
			 alert("请输入优惠价!");
			 theform.preferPrice.focus();
			 return false;
	    }
		 if(theform.preferPrice.value!=""){
		 var Letters = "1234567890.";
		 for (i=0;i<theform.preferPrice.value.length;i++)
		   {
			  var CheckChar = theform.preferPrice.value.charAt(i);
			  if (Letters.indexOf(CheckChar) == -1){
				  alert("请输入合法的优惠价!");
				  theform.preferPrice.focus();
				  return false;
				  }
  			 } 
		 }
		 
     
		 if(theform.storage.value ==""){
			 alert("请输入库存!");
			 theform.storage.focus();
			 return false;
	    }
		 if(theform.storage.value!=""){
		 var Letters = "1234567890";
		 for (i=0;i<theform.storage.value.length;i++)
		   {
			  var CheckChar = theform.storage.value.charAt(i);
			  if (Letters.indexOf(CheckChar) == -1){
				  alert("请输入合法库存!");
				  theform.storage.focus();
				  return false;
				  }
  			 } 
		 }
		 
         if (document.theform.maxPicture.value.substr(document.theform.maxPicture.value.length - 4, 4).toLowerCase().match("^.jpg|.bmp|.gif$") == null)
              {
                  alert("大图片图像类型不是JPG,BMP,GIF类型");
                   theform.maxPicture.focus();
			       return false;
              }

          if (document.theform.minPicture.value.substr(document.theform.minPicture.value.length - 4, 4).toLowerCase().match("^.jpg|.bmp|.gif$") == null)
              {
                  alert("小图片图像类型不是JPG,BMP,GIF类型");
                   theform.minPicture.focus();
			return false;
              }
      }
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -