<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>模拟</title>
<script type="text/javascript" src="../kuwenjian/angular.js" ></script>
<script>
var app = angular.module("myapp",[]);
app.controller("mycon",function($scope){
$scope.mohu="";
$scope.pxfs="";
$scope.qxz="--请选择--";
$scope.orderFlag="";
$scope.orderLine="";
$scope.xinshuzu=[];
//点击删除执行的方法
$scope.dleone=function(bian){
for(var i=0;i<$scope.data.length;i++){
if($scope.data[i].bianhao==bian){
$scope.data.splice(i,1);
}
}
}
//点击更改执行的方法
$scope.updeteprice=function(price){
for(var i=0;i<$scope.data.length;i++){
if($scope.data[i].jiage==price){
var updprice = parseInt(window.prompt("请输入要修改的价格",price));
if(updprice < 0) {
alert("输入有误,请重新更改");
} else {
if(window.confirm("确定要将" + $scope.data[i].mingcheng + "的价格更改为:" + updprice + "吗?"))
HBuilder中的遍历添加数据+全选+删除+批量删除+更改+排序
最新推荐文章于 2024-03-13 15:28:30 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)