/******************************************************************************* * ������ encode(word) ���ܣ� ����HTML ��ڲ��� word ����ֵ�� * ��html��ʽ�����ύ��html�ı� ******************************************************************************/ function encode(word) { illegalchar = new Array('<', '&', '"', ">", ' '); var result = "", result1 = "", temp = ""; for (var j = 0; j < illegalchar.length; j++) { // if (word.indexOf(illegalchar[j])!=-1){ // for(int i=0;i' : temp = ">"; break; case '"' : temp = """; break; case ' ' : temp = " "; break; // default : continue; } result = result + resultFirst + temp word = word.substring(k + 1, word.length) // document.write(result+"0"+temp+"0"+word.substring(0,k)) // result=result+temp+word.substring(0,k) // word=word.substring(k+1,word.length) // document.write(u) // document.write(word+u) // document.write(word) } // result=result+word // document.write(word) // result=result+word.substring(0,k) } // document.write("www"+word) result = result + word // document.write(result) if (result.length == 0) return word; // document.write(result) return result; }