//如果有一个字符串"Rome was not built in a day" //请用程序统计该字符串中字符的个数,不允许使用字符串对象的length属性。 var str="Rome was not built in a day"; a=str.lastIndexOf("y"); a++; document.write("字符串长度:"+a) document.write("<br/>")