?? materialchecktable.js
字號:
// JavaScript Document
// JavaScript Document
function checkValue() {
var materialNo = document.form1.materialNo.value;
if (materialNo=="") {
window.alert("請輸入庫存編號");
document.form1.materialNo.focus();
return false;
}
if (materialNo!=""){
var regp =/^\d{1,9}$/;
if (materialNo.match(regp) == null)
{
document.form1.materialNo.focus();
alert("輸入庫存編號格式錯誤!");
return false;
}
}
if (materialNo.length > 30){
window.alert("輸入庫存編號長度超出,限定為15個中文字符或者30個英文字符。");
document.form1.materialNo.focus();
return false;
}
var materialTypeNo = document.form1.materialTypeNo.value;
if (materialTypeNo.length > 20){
window.alert("輸入物品類型長度超出,限定為10個中文字符或者20個英文字符。");
document.form1.materialTypeNo.focus();
return false;
}
if (materialTypeNo=="") {
window.alert("請選擇物品類型");
document.form1.materialTypeNo.focus();
return false;
}
var materialName = document.form1.materialName.value;
if (materialName=="") {
window.alert("請輸入物品名稱");
document.form1.materialName.focus();
return false;
}
var checkBy = document.form1.checkBy.value;
if (checkBy.length > 30){
window.alert("輸入維修人長度超出,限定為15個中文字符或者30個英文字符。");
document.form1.checkBy.focus();
return false;
}
if (materialName.length > 50){
window.alert("輸入物品名稱長度超出,限定為25個中文字符或者50個英文字符。");
document.form1.materialName.focus();
return false;
}
var maModel = document.form1.maModel.value;
if (maModel.length > 50){
window.alert("輸入型號長度超出,限定為25個中文字符或者50個英文字符。");
document.form1.maModel.focus();
return false;
}var maBrand = document.form1.maBrand.value;
if (maBrand.length > 50){
window.alert("輸入品牌長度超出,限定為25個中文字符或者50個英文字符。");
document.form1.maBrand.focus();
return false;
}var maMadeIn = document.form1.maMadeIn.value;
if (maMadeIn.length > 50){
window.alert("輸入產地長度超出,限定為25個中文字符或者50個英文字符。");
document.form1.maMadeIn.focus();
return false;
}
var outCount = document.form1.outCount.value;
if (outCount!=""){
var regp =/^\d{1,9}$/;
if (outCount.match(regp) == null)
{
document.form1.outCount.focus();
alert("輸入出庫數量格式錯誤!");
return false;
}
}
var nowCount = document.form1.nowCount.value;
if (nowCount!=""){
var regp =/^\d{1,9}$/;
if (nowCount.match(regp) == null)
{
document.form1.nowCount.focus();
alert("輸入庫存數量格式錯誤!");
return false;
}
}
var checkCount = document.form1.checkCount.value;
if (checkCount=="") {
window.alert("請輸入盤點數量");
document.form1.checkCount.focus();
return false;
}
if (checkCount!=""){
var regp =/^\d{1,9}$/;
if (checkCount.match(regp) == null)
{
document.form1.checkCount.focus();
alert("輸入盤點數量格式錯誤!");
return false;
}
}
var checkDate = document.form1.checkDate.value;
if (checkDate=="") {
window.alert("請輸入盤點日期");
document.form1.checkDate.focus();
return false;
}
var remark = document.form1.remark.value;
if (remark.length > 100){
window.alert("輸入備注長度超出,限定為50個中文字符或者100個英文字符。");
document.form1.remark.focus();
return false;
}
return true;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -