javascript找不到对象的问题,超级简单
很简单的一段代码如下:
<%@page contentType= "text/html "%>
<%@page pageEncoding= "UTF-8 "%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN "
"http://www.w3.org/TR/html4/loose.dtd ">
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=UTF-8 ">
<title> JSP Page </title>
</head>
<script language= "javascript " type= "javascript ">
function ToggleAll() {
if(document.Contact.selectAll.checked) {
var i =0;
while (i < document.Contact.elements.length) {
opener.document.RealSend.contactList.value += document.Contact.elements[i].value + ", ";
opene+r.document.RealSend.contactList.value = (opener.document.RealSend.contactList.value).replace( ",, ", ", ");
document.Contact.elements[i].checked=1;
i++;
}
} else {
var i =0;
while (i < document.Contact.elements.length) {
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( ",, ", ", ");
document.Contact.elements[i].checked=0;
i++;
}
}
chkComma();
}
//
function groupAll(groupElem) {
alert( "groupAll fuc is called! ");
var i =