0
我有表單域,該表單字段被提交到下一個頁面使用以下javascript代碼..,代碼在Firefox中工作正常,但表單不被提交在Internet Explorer中。Javascript表單提交不工作,只發布在互聯網瀏覽器
function addarray(formId)
{
var ara = tmm.length;
//alert(ara);
for(var sds=0; sds < tmm.length; sds++)
{
var sss = tmm[sds];;
ara = ara+"*#*#*"+sss;
//alert(ara);
if(sss <= 0)
{
alert("\n\n\nYou should have atleast one submenu \n for each main menu \n\n");
return false;
}
}
var ddf = document.blcname.getElementsByTagName("input");
var i = 0;
while(i < ddf.length)
{
var dddd = ddf[i].type;
var vla = ddf[i].value;
//alert(i+"----"+vla+"-----"+dddd);
if(dddd=="text"){
if(vla == "")
{
//alert("Please fill all the required fields....");
return false;
}
}
i=i+1;
}
var setform = document.getElementById('arav');
setform.value = ara;
var formObj = document.getElementById(formId);
formObj.action = "get-code.php";
formObj.submit();
//document.blcname.submit();
}
在此先感謝
@ user384210:您應該嘗試「提醒」,至少要查看函數是否隨時調用。 – 2011-01-27 08:56:10
P/s:你應該接受一些以前的答案。 – 2011-01-27 08:56:29