<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_43513"> <div class="blockcode"> <div id="code_ZwW"><ol> <li> <li><script><li>var priceOfApple = "3元"; // 苹果的价格<li>var priceOfBanana = "3.5元"; // 香蕉的价格<li>priceOfApple = parseInt( priceOfApple ); // 解析苹果的价格<li>var priceOfBanana2 = parseInt( priceOfBanana ); // 解析香蕉的价格<li>if( ( priceOfApple===3 ) && ( priceOfBanana2 === 3 ) // 检查解析是否成功<li>&& ( parseFloat( priceOfBanana ) ===3.5 ) ) <li>{<li>alert( "苹果的价格:" + priceOfApple // 输出水果的价格<li>+ "\n香蕉的价格的整数部分:" + priceOfBanana2<li>+ "\n香蕉的价格:" + parseFloat( priceOfBanana ) );<li>}<li></script></li> </ol></div> <em onclick="copycode($('code_ZwW'));">复制代码</em> </div> </td></tr></table> <div id="comment_43513" class="cm"> </div> <div id="post_rate_div_43513"></div> <br><br>