<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>javascript实例</title>
<script src="jquery-1.4.2.js" type="text/javascript"></script>
<script type="text/javascript">
function removeWithoutCopy(arr, item) {
for(var i=0;i<arr.length;i++)
{
if(arr[i]==item)
{
arr.splice(i,1);
i=0;
}
}
return arr;
}
alert(removeWithoutCopy([1,2,4,3, 2,8], 2));
</script>
</head>
<body>
</body>
</html>