js with

xiaoxiao2026-09-15  15

 with就是为了减少代码  <script language="javascript" type="text/javascript">  x = Math.cos(3 * Math.PI);  alert("没有使用with:"+x);  with (Math){   y = cos(3 * PI);}  alert("没有使用with:x"+x+"使用with:y"+y);  </script>

转载请注明原文地址: https://www.6miu.com/read-5052708.html

最新回复(0)