column.js
资源名称:shop.rar [点击查看]
上传用户:yatiankong
上传日期:2014-05-16
资源大小:5604k
文件大小:2k
源码类别:
Applet
开发平台:
Java
- 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;
- }
- }