菜鸟教程(runoob.com)
单击按钮删除数组的最后一个元素。
点我
var fruits = ["Banana", "Orange", "Apple", "Mango"];
function myFunction(){
fruits.pop();
var x=document.getElementById("demo");
x.innerHTML=fruits;
}