php页面中有一个如下函数:我看不太明白,望解释。。function gotoFormVal(val,formId,stepIndex){
if(formId==undefined)
formId = "";
if(stepIndex==undefined)
stepIndex = "";
document.BitForm.formId.value=formId; //这个是把 值 传到哪里 ?
document.BitForm.stepIndex.value=stepIndex; //这个是把 值 传到哪里 ? if(document.BitForm.stepIndexNext!=undefined){
document.BitForm.stepIndexNext.value="";
document.BitForm.stepCode.value="";
}
document.getElementById('FORM_TYPE').value=val;
document.BitForm.action="FormVS.php"
document.BitForm.submit();
}
if(formId==undefined)
formId = "";
if(stepIndex==undefined)
stepIndex = "";
document.BitForm.formId.value=formId; //这个是把 值 传到哪里 ?
document.BitForm.stepIndex.value=stepIndex; //这个是把 值 传到哪里 ? if(document.BitForm.stepIndexNext!=undefined){
document.BitForm.stepIndexNext.value="";
document.BitForm.stepCode.value="";
}
document.getElementById('FORM_TYPE').value=val;
document.BitForm.action="FormVS.php"
document.BitForm.submit();
}
document.BitForm.stepIndex.value=stepIndex; //这个是把 值 传到哪里 ?这两句是在赋值~·
给BitForm表单的formId和stepIndex文本框赋值~·
document.BitForm.stepIndex.value=stepIndex; //这个是把 值 传到哪里 ?
意思是:
给表单名为BitForm的name为formId的元素赋值formId
给表单名为BitForm的name为stepIndex的元素赋值stepIndex
然后提交表单的时候 这个新值就会提交到url 也就是对应的php后台去