js判断数据类型是否为字符串 判断数据是否为字符串类型: <script type="text/javascript"> //<![CDATA[ document.write(isString('test'),'<br/>'); document.write(isString(10),'<br/>'); function isString(str){ return (typeof str=='string')&&str.constructor==String; } //]]> </script> Published by 风君子 独自遨游何稽首 揭天掀地慰生平 View all posts by 风君子