一个上午,我无法解决这个错误!
对javascript不熟悉,算是个理由吧
把代码贴出来,请诸位抽空解决下,谢谢
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=UTF-8 ">
<title> JSP Page </title>
</head>
<script language= "javascript " type= "javascript ">
function groupAll(groupElem) {
alert( "groupAll fuc is called! ");
var i = groupElem + 1;
if(!document.Contact.elements[groupElem].checked) {
while (i < document.Contact.elements.length) {
if(document.Contact.elements[i].value == " " || document.Contact.elements[i].name.substring(0, 12) == "wordcheckbox ") {
chkComma();
return;
}
opener.document.RealSend.contactList.value += ", " + document.Contact.elements[i].value + ", ";
opener.document.RealSend.contactList.value = (opener.document.RealSend.contactList.value).replace( ",, ", ", ");
i++;
}
} else {
while (i < document.Contact.elements.length) {
if(document.Contact.elements[i].value == " " || document.Contact.elements[i].name.substring(0, 12) == "wordcheckbox ") {
chkComma();
return;
}
opener.document.RealSend.contactList.value = (opener.document.RealSend.contactList.value).replace(document.Contact.elements[i].value, " ");
opener.document.RealSend.contactList.value = (opener.document.RealSend.contactList.value).replace( ",, ", ", ");
i++;