一段简单js,ff不执行 在线等高手
function BatchInsert() {
var arrData = new Array();
var success = 0; //成功个数
var error = 0;
var objid; //对应产品明细的objid
var objTable = document.getElementById("GoodslistTable");
//checkbox 的列表
var eList = document.getElementsByName("ckbitem");
var id = "";
var gg = "";
var num = "";
var pp = "";
var jg = ""; var kcnum = "";
for (var i = 1; i < objTable.rows.length; i+=2) {
var j = parseInt(i / 2);
if (eList[j].checked) {
objid = objTable.rows[i].cells[5].innerHTML;
var objtemp = objTable.rows[i].cells[2].innerHTML;
var arr = new Array();
arr = objtemp.split("<BR><BR>");
if (arr.length > 1) {
var arr1 = new Array();
arr1 = arr[1].split(" ");
gg = arr1[0].replace("规格:", "").replace("<", "<").replace(">", ">"); //规格
id = arr1[1].replace("编号:", ""); //编号
kcnum = arr1[2].replace("库存:",""); //库存数量
}
jg = objTable.rows[i].cells[3].innerText.replace("¥", "");
num = objTable.rows[i].cells[4].firstChild.value; //numlist[i].value;
pp = objTable.rows[i].cells[6].innerHTML;
if (islog == "0") {
alert("您还未登录,请登录进行操作!");
window.location.href = "../login.aspx";
return false;
}
else {
if (isfkcchuku == "0") {
if (parseInt(num) > parseInt(kcnum)) {
alert("不允许负库存出库");
return false;
}
}
}
//判断价格不能为0
if (jg == "0" || jg == "0.00" || jg == 0 || jg == "0.0000") { //当价格为0时
if (islog == "0") {
alert("您还未登录,请登录进行操作!");
window.location.href = "../login.aspx";
return false;
}
else {
alert("价格信息错误,请联系供应商!!!");
return false;
}
}
}
}
}
------解决方案--------------------
打开firefox的控制台,看看具体的错误的信息,然后参考着改
------解决方案--------------