做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

使用Bootstrap和Vue實現用戶信息的編輯刪除功能

來源:懂視網 責編:小采 時間:2020-11-27 22:26:57
文檔

使用Bootstrap和Vue實現用戶信息的編輯刪除功能

使用Bootstrap和Vue實現用戶信息的編輯刪除功能:使用Bootstrap實現簡單的布局,并結合Vue進行用戶信息的編輯刪除等功能,代碼如下 <!DOCTYPE html> <html> <head> <meta charset=utf-8> <title>用戶信息編輯</title> <lin
推薦度:
導讀使用Bootstrap和Vue實現用戶信息的編輯刪除功能:使用Bootstrap實現簡單的布局,并結合Vue進行用戶信息的編輯刪除等功能,代碼如下 <!DOCTYPE html> <html> <head> <meta charset=utf-8> <title>用戶信息編輯</title> <lin

使用Bootstrap實現簡單的布局,并結合Vue進行用戶信息的編輯刪除等功能,代碼如下

<!DOCTYPE html>
<html>
<head>
 <meta charset="utf-8">
 <title>用戶信息編輯</title>
 <link rel="stylesheet" type="text/css" href="bootstrap.min.css" rel="external nofollow" >
 <script type="text/javascript" src="jquery.js"></script>
 <script type="text/javascript" src="bootstrap.js"></script>
 <script type="text/javascript" src="vue.js"></script>
</head>
<body>
 <div class="container">
 <form role="form">
 <div class="form-group">
 <label for="username">用戶名</label>
 <input type="text" name="username" class="form-control" placeholder="請輸入用戶名" v-model="username">
 </div>
 <div class="form-group">
 <label for="password">密碼</label>
 <input type="password" name="password" class="form-control" placeholder="請輸入密碼" v-model="password">
 </div>
 <div class="form-group">
 <button type="button" class="btn btn-primary" @click="add()">添加</button>
 <button type="reset" class="btn btn-danger">重置</button>
 </div>
 </form>
 <hr>
 <table class="table table-bordered table-hover">
 <caption class="h3 text-info">用戶信息</caption>
 <tr>
 <th class="text-center">序號</th>
 <th class="text-center">用戶名</th>
 <th class="text-center">密碼</th>
 <th class="text-center">操作</th>
 </tr>
 <tr class="text-center" v-for="item in myData">
 <td>{{$index+1}}</td>
 <td>{{item.name}}</td>
 <td>{{item.password}}</td>
 <td>
 <button class="btn btn-danger" data-toggle="modal" data-target="#myModal" @click="nowIndex=$index">刪除</button>
 </td>
 </tr>
 <tr v-show="myData.length!=0">
 <td colspan="4" class="text-center">
 <button class="btn btn-danger" data-toggle="modal" data-target="#myModal" @click="nowIndex=-2">刪除全部</button>
 </td>
 </tr>
 <tr v-show="myData.length==0">
 <td colspan="4" class="text-center">
 <h5 class="text-muted">暫無信息...</h5>
 </td>
 </tr>
 </table>
 <!-- 模態框 -->
 <div class="modal fade" id="myModal" role="dialog" tabindex="-1">
 <div class="modal-dialog">
 <div class="modal-content">
 <div class="modal-header">
 <button type="button" class="close" data-dismiss="modal"><span>×</span></button>
 <h4 class="modal-title text-danger">警告!</h4>
 </div>
 <div class="modal-body">
 <h4 class="text-center">確認刪除?</h4>
 </div>
 <div class="modal-footer">
 <button type="button" data-dismiss="modal" class="btn btn-primary">取消</button>
 <button type="button" data-dismiss="modal" class="btn btn-danger" @click="deleteMsg(nowIndex)">確認</button>
 </div>
 </div>
 </div>
 </div>
 </div>
<script type="text/javascript">
 new Vue({
 el: ".container",
 data: {
 myData:[],
 username:"",
 password:"",
 nowIndex:-100
 },
 methods:{
 add:function(){
 this.myData.push({
 name:this.username,
 password:this.password
 });
 this.username="";
 this.password="";
 },
 deleteMsg:function(n){
 if(n==-2){
 this.myData=[];
 }else{
 this.myData.splice(n,1);
 }
 }
 }
 });
</script>
</body>
</html>

實現效果如下,因為只是簡單的實現編輯刪除的功能,因此密碼就直接顯示在表格中,沒有進行加密顯示

整體布局界面


這是整體布局界面

用戶信息編輯后添加

用戶信息編輯后添加

刪除數據

刪除數據

總結

以上所述是小編給大家介紹的使用Bootstrap和Vue實現用戶信息的編輯刪除功能,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對腳本之家網站的支持!

聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

使用Bootstrap和Vue實現用戶信息的編輯刪除功能

使用Bootstrap和Vue實現用戶信息的編輯刪除功能:使用Bootstrap實現簡單的布局,并結合Vue進行用戶信息的編輯刪除等功能,代碼如下 <!DOCTYPE html> <html> <head> <meta charset=utf-8> <title>用戶信息編輯</title> <lin
推薦度:
標簽: 刪除 使用 VUE
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 鄂托克前旗| 巩留县| 桐城市| 宁安市| 武山县| 伊春市| 泰兴市| 荆州市| 伊吾县| 沙田区| 读书| 吉安县| 湖南省| 寻乌县| 宜丰县| 丹东市| 通辽市| 威远县| 遂溪县| 佛冈县| 阳朔县| 舒兰市| 任丘市| 工布江达县| 稷山县| 时尚| 岳普湖县| 阿瓦提县| 贵阳市| 乳山市| 抚顺市| 孟村| 陇川县| 宝丰县| 克山县| 大兴区| 云南省| 建瓯市| 中卫市| 铁岭县| 共和县|