<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> <li>var priceOfApple = "3元"; // 苹果的价格</li> <li>var priceOfBanana = "3.5元"; // 香蕉的价格</li> <li>priceOfApple = parseInt( priceOfApple ); // 解析苹果的价格</li> <li>var priceOfBanana2 = parseInt( priceOfBanana ); // 解析香蕉的价格</li> <li>if( ( priceOfApple===3 ) && ( priceOfBanana2 === 3 ) // 检查解析是否成功</li> <li>&& ( parseFloat( priceOfBanana ) ===3.5 ) ) </li> <li>{</li> <li>alert( "苹果的价格:" priceOfApple // 输出水果的价格</li> <li> "n香蕉的价格的整数部分:" priceOfBanana2</li> <li> "n香蕉的价格:" parseFloat( priceOfBanana ) );</li> <li>}</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>