TagTemplate类中的addElement方法中的for语句有误:
public void addElement(String strTagName, String strElementName, String strElementType)
{
....
for(int index = 0; index < tagListLenth; tagListLenth++)
{
........
}
}应该是: public void addElement(String strTagName, String strElementName, String strElementType)
{
....
for(int index = 0; index < tagListLenth; index++)
{
........
}
}可能是你不小心写错了吧
public void addElement(String strTagName, String strElementName, String strElementType)
{
....
for(int index = 0; index < tagListLenth; tagListLenth++)
{
........
}
}应该是: public void addElement(String strTagName, String strElementName, String strElementType)
{
....
for(int index = 0; index < tagListLenth; index++)
{
........
}
}可能是你不小心写错了吧
function check()
之间加入下列语句:
function isnumber(c)
{
if ((c>='0') && (c<='9')) return true;
else return false;
}function check_num(s)
{
for (i=0; i<s.length; i++)
{
n = s.substr(i, 1)
if (!isnumber(n))
{
return false;
}
}
return true;
}然后在function check()里面加入:
if (!check_num(p))
{
alert("只能由数字(0-9)构成!");
document.form1.pwsd.focus();
document.form1.pwsd.select();
return;
}