while( str != '' )
{
oldStr = str
getStr = str.substr(0,1)
eval("str = str.replace(/"+getStr+"/g,'')")
if( oldStr.length-str.length > maxLength )
{
maxLength = oldStr.length-str.length
result = getStr + "=" + maxLength
}
}
alert(result)
</script>
文章评论(0条评论)
登录后参与讨论