<div class="codetitle"> <span><a style="CURSOR: pointer" data="3522" class="copybut" id="copybut3522" onclick="doCopy('code3522')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code3522"> <br><script type="text/javascript"> <BR>var avar ="1"; <BR>var b=false; <BR>var c="dd"; <BR>var d={ <BR>valueOf:function(){return -1} <BR>}; <BR>alert(a );//輸出1 說明後置運算子是想執行語句用的是原始值; <BR>alert(a);//輸出2 說明後置語句執行完原始值之後再去改變該值; <BR>alert( b); //輸出1; <BR>alert(c );//輸出NaN; <BR>alert(d );//輸出-1; <BR></script> <br> </div>