input{
border-radius: 5px;
}
ul{
list-style: none;
}
.tip{
color: red;
}
.aquamarine{
background-color: aquamarine;
}
.antiquewhite{
background-color: antiquewhite;
}

–按要求排序–
上映时间正序
上映时间倒序
售价正序
售价倒序

  • 电影名称:
  • 售价:
  • 类别:
  • 导演:
  • 评分:
  • 上映时间:
  • 时长:
电影名称 类别 时长 导演 售价 上映时间 评分 操作
{{m.name}} {{m.type}} {{m.time}} {{m.author}} {{m.price|currency:”¥:”}} {{m.playTime|date:”yyyy-MM-dd HH:mm:ss”}} {{m.score}}
    <!--<ul ng-show="showUpdate"><li>请输入要修改的票价:</li><li><input type="text" ng-model="mprice"/></li><li><input type="button" value="ok" ng-click="update()"/><input type="button" value="cancel" ng-click=""/></li></ul>--><script type="text/javascript">function checkAll(){var cbs=$("td [type=checkbox]");cbs.each(function(){if(this.checked){$(this).prop("checked",false);}else{$(this).prop("checked",true);}})}var app=angular.module("myapp",[]);app.controller("myctrl",function($scope){$scope.movies=[{"price": 35.9,"author": "田羽生","time": 120,"type": "喜剧, 爱情","id": 1,"name": "前任三","playTime": 1511050949001,"score": 9.3},{"price": 45.5,"author": "格雷","time": 145,"type": "动作,冒险","id": 2,"name": "速度与激情8","playTime": 1450000949001,"score": 9.5},{"price": 42.5,"author": "宋阳","time": 135,"type": "喜剧,爱情","id": 3,"name": "羞羞的铁拳","playTime": 1511000949001,"score": 8.6},{"price": 38.9,"author": "弗拉基米尔","time": 108,"type": "冒险,科幻","id": 4,"name": "太空救援","playTime": 1516000949001,"score": 9.4}];$scope.add=function(){var newmovie={};newmovie.name=$scope.aname;newmovie.price=$scope.aprice;newmovie.type=$scope.atype;newmovie.playTime=$scope.aplayTime;newmovie.time=$scope.atime;newmovie.author=$scope.aauthor;newmovie.score=$scope.ascore;if(newmovie.name==""||newmovie.name==null||newmovie.name==undefined){$("#name").text("*电影名称不能为空");return;}if(newmovie.price==""||newmovie.price==null||newmovie.price==undefined||newmovie.price<=0){$("#price").text("*售价大于0");return;}if(newmovie.type==""||newmovie.type==null||newmovie.type==undefined){$("#type").text("*类型不能为空");return;}if(newmovie.author==""||newmovie.author==null||newmovie.author==undefined){$("#author").text("*导演不能为空");return;}if(newmovie.score==""||newmovie.score==null||newmovie.score==undefined){$("#score").text("*评分不能为空");return;}if(newmovie.playTime==""||newmovie.playTime==null||newmovie.playTime==undefined){$("#playTime").text("*上映时间不能为空");return;}if(newmovie.time==""||newmovie.time==null||newmovie.time==undefined){$("#time").text("*时长不能为空");return;}$scope.movies.push(newmovie);}$scope.del=function(name){if(confirm("您确定要删除吗?")){for (var i = 0; i < $scope.movies.length; i++) {if($scope.movies[i].name==name){$scope.movies.splice(i,1);break;}}}}$scope.delAll=function(){var cbs=$("td input:checked");if(cbs.length==0){alert("请选择要删除的数据");}else{if(confirm("确定删除吗?")){cbs.each(function(){for (var i = 0; i < $scope.movies.length; i++) {if($scope.movies[i].name==$(this).val()){$scope.movies.splice(i,1);break;}}})}   }}var modifydata;$scope.modify=function(name){for(var i = 0; i < $scope.movies.length; i++) {if($scope.movies[i].name == name) {modifydata=$scope.movies[i];break;}}//弹出提示框var data=prompt("请输入要修改的票价:",modifydata.price);
//             alert(data);if(data!=null){modifydata.price=data;}}});</script>
</body>

Angular JS 增删改查(弹框修改)相关推荐

  1. 前端学习(1348):用户的增删改查操作5修改

    //创建http连接 const http = require('http'); //创建服务器 const app = http.createServer(); //第三方模块导入 const mo ...

  2. 前端学习(1347):用户的增删改查操作4修改

    //创建http连接 const http = require('http'); //创建服务器 const app = http.createServer(); //第三方模块导入 const mo ...

  3. python 文件操作大总结 对文件的增删改查,备份, 批量修改,创建和删除 文件的备份

    python 的文件操作 文件的作用 永久的保存数据 文件中的内存保存在硬盘中 硬盘中的数据都是 0 和 1, 软件将 0 和 1的组合转换成我们认识的汉字 绝对路径和相对路径 绝对路径:是从目录开始 ...

  4. MySQL学习之路 ------ 数据的增删改查、表明修改

    表插入数据 命令:insert into <表名> [( <字段名1>[,..<字段名n > ])] values ( 值1 )[, ( 值n )] 例如:往表 M ...

  5. 使用SpringBoot一小时快速搭建一个简单后台管理(增删改查)(超详细教程)

    最近也是临近期末了,各种的期末大作业,后台管理也是很多地方需要用到的,为了方便大家能快速上手,快速搭建一个简单的后台管理,我花了两天时间整理了一下 我会从0开始介绍,从数据库的设计到前端页面的引入最后 ...

  6. python操作redis--------------数据库增删改查

    安装第三方模块redis import redis 一.连接数据库,操作增删改查 ***操作string类型 1.连接数据 (1).host必填 服务器IP (2).端口号默认的事6379,可以不填写 ...

  7. jdbc增删改查有哪些步骤_用Mybatis如何实现对数据库的增删改查步骤

    使用Mybatiss实现对数据库的增删改查 文件目录 1.导入jar包,这里使用maven <dependencies><!--mybatis依赖--><!-- org. ...

  8. 【python笔记九】字典创建、字典增删改查、字典常用操作

    笔记九 python字典 字典创建 1.直接使用{} 2.使用dict() 3.空字典 字典的增删改查 增加 删除 修改 查找 字典的操作方法 get() keys() items() values( ...

  9. java增删改查代码_Java web 简单的增删改查程序(超详细)

    就是简单的对数据进行增删改查.代码如下: 1.bean层:用来封装属性及其get set方法 toString方法,有参构造方法,无参构造方法等. public classBean {private ...

最新文章

  1. 打家劫舍(不偷相邻)
  2. 活着的理由,做事的风格
  3. redux异步action_Redux数据状态管理
  4. activiti如何最后一次提交事务_MySQL如何找出未提交事务的SQL浅析
  5. html font后面跟多种字体
  6. C 的Pair用法分类整理(精)
  7. 新建文件夹和文件,并向文件中写入数据---------Android
  8. 计算机毕业设计django基于python药房药品管理系统(源码+系统+mysql数据库+Lw文档)
  9. 基于OptiSystem的高速远距离光纤通信系统研究
  10. 阿铭Linux_总览部分学习笔记20190114
  11. windows下使用frida遇到的问题
  12. 【Qt】无法定位程序输入点 于动态链接库
  13. 【毕业设计】大数据分析的客户细分 (聚类分析) - python k-means
  14. 西瓜书k-means例子matlab实现
  15. 对异地工作的一些看法
  16. html页中加入数学公式,Html+Css+JavaScript实现网页公式编辑器(一)
  17. Android L中水波纹点击效果的实现
  18. android蓝牙开发搜素,Android蓝牙开发(一)之打开蓝牙和设备搜索
  19. 多域名指向同一个网站
  20. [CoffeeScript]编码风格指南

热门文章

  1. html中文本框冒号对齐,html5 冒号分隔符对齐的实现,
  2. Exchange Reporter Plus概述
  3. MyBatis学习总结(7)——Mybatis缓存
  4. 同一个html自动跳转分页,一个页面有多个分页,相互影响
  5. lucene 增量 全量 更新索引_搜索引擎:该如何设计你的倒排索引?
  6. python3 global_Python3基础 global 在函数内部对全局变量进行修改
  7. mysql 季度最后一天,MYSQL中取目前年份的第一天和当前周,月,季度的第一天/最后一天...
  8. php删除树结构文件,树型结构列出目录中所有文件的php代码
  9. 互联网人必读 | 大数据思维的十大核心原理
  10. UNIX不带缓存的IO函数