码迷,mamicode.com
首页 > Web开发 > 详细

angularjs--DOM

时间:2017-02-03 16:52:11      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:htm   ext   name   ble   view   ade   utf-8   viewport   url   

angularjs--DOM

 1 <!DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8">
 5     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
 6     <title>index</title>
 7     <link href="{$Think.const.CSSURL}bootstrap.min.css" rel="stylesheet" type="text/css"/>
 8     <script src="{$Think.const.JS}jquery.min.js" type="text/javascript"></script>
 9     <script src="{$Think.const.JS}bootstrap.min.js" type="text/javascript"></script>
10     <script src="{$Think.const.JS}angular.min.js" type="text/javascript"></script>
11     <link href="{$Think.const.CSSURL}home/index.css" rel="stylesheet" type="text/css"/>
12 </head>
13 <body ng-app="myapp" ng-controller="myctrl">
14 <div class="container">
15     <h1 class="page-header">前端技术</h1>
16 
17     <p>
18         <button class="btn btn-primary" ng-click="dis()">禁用</button>
19     </p>
20     <div class="form-group">
21         <label for="">留言:</label>
22         <textarea class="form-control" ng-disabled="nd"></textarea>
23     </div>
24 
25     <p>
26         <button class="btn btn-primary" ng-click="hide()">隐藏</button>
27     </p>
28     <div class="jumbotron" ng-hide="ns">
29         <h1>jumborton</h1>
30     </div>
31 
32     <img src="{$Think.const.HOMEIMG}/01.png" />
33 </div>
34 </body>
35 <script>
36     app = angular.module("myapp",[]);
37     app.controller("myctrl",function($scope){
38 
39         $scope.dis = function(){
40             $scope.nd = true;
41         }
42 
43         $scope.hide = function(){
44             $scope.ns = true;
45         }
46 
47     });
48 </script>
49 </html>

angularjs--DOM

标签:htm   ext   name   ble   view   ade   utf-8   viewport   url   

原文地址:http://www.cnblogs.com/yuge790615/p/6362875.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!