欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!
  我们首先来看一下pop方法的基本语法
 
  array.pop();
 
  接着我们来看pop方法使用的具体示例
 
  代码如下
 
  
 
  <!DOCTYPEhtml>
 
  <html>
 
  <head>
 
  <metacharset="utf-8">
 
  <title></title>
 
  </head>
 
  <body>
 
  <scripttype="text/javascript">
 
  varscripts=newArray();
 
  scripts[0]="PHP";
 
  scripts[1]="ASP";
 
  scripts[2]="JavaScript";
 
  scripts[3]="HTML";
 
  document.write(scripts.join("<br>"));
 
  document.write("<br>--使用pop()方法后的结果--<br>");
 
  scripts.pop();
 
  document.write(scripts.join("<br>"));
 
  </script>
 
  </body>
 
  </html>






本文转载自中文网
 

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css3-style/c56299.shtml