菜鸟级的问题,关于动态传递表单对象的问题
本人是javascript白痴.下面的代码正确的格式应该是怎样?万分感激
var maxLen = 1000;
function checkMaxInput(form,checkfield,showfield) {
if (form + "." + checkfield + ".value.length > maxLen)
form + "." + checkfield + ".value" = eval(form + "." + checkfield + ".value.substring(0, maxLen)");
else
form + "." + showfield + ".value" = eval(form + "." + checkfield + ".value.length");
}