摘要: <script type="text/javascript">//数值与字符串相加var a=5,b=2,c="4";document.write(a+c+"<br/>");//数值与字符串相加 54document.write(a+parseFloat(c)+"<br/>");//c通过parseFloat()方法转化为字符串 9document.write(a+(c-0)+"<br/>");//字符串转化为数值然后再相加 9document.w 阅读全文
posted @ 2012-03-26 14:53 闫森 阅读(766) 评论(1) 推荐(1) 编辑