AngularJS操作表格的增删改查

  • Post author:
  • Post category:其他




源代码:







<!DOCTYPE html>

<html>



<head>



<meta charset=”UTF-8″>



<title></title>



<script type=”text/javascript” src=”js/angular.min.js”></script>



<script type=”text/javascript” src=”js/jquery-3.2.1.min.js”></script>



<style>



.tab {




text-align: center;



margin-top: 20px;



}






.fie{




margin-top: 30px;



width: 250px;



}






.ok{




width: 60px;



margin-left: 80px;



}






.tr1:nth-of-type(odd){




background: #999999;



}



</style>



</head>



<body ng-app=”myApp” ng-controller=”myCtrl”>



<h2>管理信息</h2>



<input type=”button” value=”批量删除” ng-click=”deleall()” /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户名:



<input type=”text” placeholder=”按照用户名查询..” ng-model=”g_name” ng-keydown=”cha_name($event)” />



<select ng-change=”chang()” ng-model=”pai_age” ng-init=”pai_age=’–请选择–‘”>

<option>–请选择–</option>



<option ng-repeat=”age in ages”>{

{age}}</option>



</select>



<input type=”button” value=”添加” ng-click=”xianshi()” />



<table border=”1px” cellspacing=



版权声明:本文为mayn666原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。