<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="js/a.js"></script>
<script src="js/b.js"></script>
</head>
<body>
<p>尝试修改以下表单。</p>
<div>
<div id ="myfirst" ng-init="">
<p>名字 : <input type="text" ng-model="name"></p>
<input type="text" name="user" ng-model="user" required>
<span style="color:red" ng-show="myForm.user.$dirty && myForm.user.$invalid">
<span ng-show="myForm.user.$error.required">用户名是必须的。</span>
<h1>Hello {{name}}</h1>
</div>
</div>
<form ng-app="myApp" ng-controller="validateCtrl"
name="myForm" novalidate>
<!-- novalidate 属性是在 HTML5 中新增的。禁用了使用浏览器的默认验证。 -->
<p>用户名:<br>
<input type="text" name="user" ng-model="user" required>
<span style="color:red" ng-show="myForm.user.$dirty && myForm.user.$invalid">
<span ng-show="myForm.user.$error.required">用户名是必须的。</span>
</span>
</p>
<p>jone doe @gmail.com </p>
<p>邮箱:<br>
<input type="email" name="email" ng-model="email" required>
<span style="color:red" ng-show="myForm.email.$dirty && myForm.email.$invalid">
<span ng-show="myForm.email.$error.required">邮箱是必须的。</span>
<span ng-show="myForm.email.$error.email">非法的邮箱。</span>
</span>
</p>
<p>
<input ng-controller="a" type="submit"
ng-disabled="myForm.user.$dirty && myForm.user.$invalid ||
myForm.email.$dirty && myForm.email.$invalid">
</p>
myform.user.$dirty.email.required scope scope scope
</form>
<p>form = {{user}}</p>
<p>master = {{master}}</p>
<div ng-app="app">
<input type="text" ng-model= "name" required>
<p>{{ name }}</p>
</div>
hellow zhe world
i can speak to you
who is you
what is you name
where you from
can i hellep you
what can i do for you
dog
banane
tiger
chicken
mangkey
how i try to do
but he is stay the door
if frender for me
<script type="text/javascript">
function a(opt){
this.options = $.excend({
},opt || {});
}
</script>
<script>
var app = angular.module('myApp', []);
app.controller('validateCtrl', function($scope) {
$scope.user = 'John Doe';
$scope.email = 'john.doe@gmail.com';
});
app.controller('a', function($scope) {
$scope.user = 'John Doe';
$scope.email = 'john.doe@gmail.com';
});
</script>
<script>
var transform = function(data){
return $.param(data);
}
$http.post("/foo/bar", requestData, {
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
transformRequest: transform
}).success(function(responseData) {
//do stuff with response
});
// var app = angular.module('myApp', []);
// app.controller('myCtrl', function($scope) {
// $scope.firstName= "John";
// $scope.lastName= "Doe";
// });
var a = angular.module("id",[]);
a.controller("b",function($scope){
})
app.controller('customersCtrl', function($scope, $http) {
$http.get("http://www.runoob.com/try/angularjs/data/Customers_JSON.php")
.success(function (response) {$scope.names = response.records;});
})
</script>
<script>
var app2 = angular.module('myfirst', []);
angular.bootstrap(document.getElementById("myfirst"), ['myfirst']);
// var app = angular.module('myApp', []);
// app.controller('formCtrl', function($scope) {
// $scope.master = {firstName: "John", lastName: "Doe"};
// $scope.reset = function() {
// $scope.user = angular.copy($scope.master);
// };
// $scope.reset();
// });
</script>
<script type="text/javascript">
try{
if(window.console&&window.console.log){
console.log("一张网页,要经历怎样的过程,才能抵达用户面前?\n一位新人,要经历怎样的成长,才能站在技术之巅?\n探寻这里的秘密;\n体验这里的挑战;\n成为这里的主人;\n加入百度,加入网页搜索,你,可以影响世界。\n");
console.log("请将简历发送至 %c ps_recruiter@baidu.com( 邮件标题请以“姓名-应聘XX职位-来自console”命名)","color:red");
console.log("职位介绍:http://dwz.cn/hr2013")}
}catch(e){};
</script>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<script src="js/a.js"></script>
<script src="js/b.js"></script>
</head>
<body>
<p>尝试修改以下表单。</p>
<div>
<div id ="myfirst" ng-init="">
<p>名字 : <input type="text" ng-model="name"></p>
<input type="text" name="user" ng-model="user" required>
<span style="color:red" ng-show="myForm.user.$dirty && myForm.user.$invalid">
<span ng-show="myForm.user.$error.required">用户名是必须的。</span>
<h1>Hello {{name}}</h1>
</div>
</div>
<form ng-app="myApp" ng-controller="validateCtrl"
name="myForm" novalidate>
<!-- novalidate 属性是在 HTML5 中新增的。禁用了使用浏览器的默认验证。 -->
<p>用户名:<br>
<input type="text" name="user" ng-model="user" required>
<span style="color:red" ng-show="myForm.user.$dirty && myForm.user.$invalid">
<span ng-show="myForm.user.$error.required">用户名是必须的。</span>
</span>
</p>
<p>jone doe @gmail.com </p>
<p>邮箱:<br>
<input type="email" name="email" ng-model="email" required>
<span style="color:red" ng-show="myForm.email.$dirty && myForm.email.$invalid">
<span ng-show="myForm.email.$error.required">邮箱是必须的。</span>
<span ng-show="myForm.email.$error.email">非法的邮箱。</span>
</span>
</p>
<p>
<input ng-controller="a" type="submit"
ng-disabled="myForm.user.$dirty && myForm.user.$invalid ||
myForm.email.$dirty && myForm.email.$invalid">
</p>
myform.user.$dirty.email.required scope scope scope
</form>
<p>form = {{user}}</p>
<p>master = {{master}}</p>
<div ng-app="app">
<input type="text" ng-model= "name" required>
<p>{{ name }}</p>
</div>
hellow zhe world
i can speak to you
who is you
what is you name
where you from
can i hellep you
what can i do for you
dog
banane
tiger
chicken
mangkey
how i try to do
but he is stay the door
if frender for me
<script type="text/javascript">
function a(opt){
this.options = $.excend({
},opt || {});
}
</script>
<script>
var app = angular.module('myApp', []);
app.controller('validateCtrl', function($scope) {
$scope.user = 'John Doe';
$scope.email = 'john.doe@gmail.com';
});
app.controller('a', function($scope) {
$scope.user = 'John Doe';
$scope.email = 'john.doe@gmail.com';
});
</script>
<script>
var transform = function(data){
return $.param(data);
}
$http.post("/foo/bar", requestData, {
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
transformRequest: transform
}).success(function(responseData) {
//do stuff with response
});
// var app = angular.module('myApp', []);
// app.controller('myCtrl', function($scope) {
// $scope.firstName= "John";
// $scope.lastName= "Doe";
// });
var a = angular.module("id",[]);
a.controller("b",function($scope){
})
app.controller('customersCtrl', function($scope, $http) {
$http.get("http://www.runoob.com/try/angularjs/data/Customers_JSON.php")
.success(function (response) {$scope.names = response.records;});
})
</script>
<script>
var app2 = angular.module('myfirst', []);
angular.bootstrap(document.getElementById("myfirst"), ['myfirst']);
// var app = angular.module('myApp', []);
// app.controller('formCtrl', function($scope) {
// $scope.master = {firstName: "John", lastName: "Doe"};
// $scope.reset = function() {
// $scope.user = angular.copy($scope.master);
// };
// $scope.reset();
// });
</script>
<script type="text/javascript">
try{
if(window.console&&window.console.log){
console.log("一张网页,要经历怎样的过程,才能抵达用户面前?\n一位新人,要经历怎样的成长,才能站在技术之巅?\n探寻这里的秘密;\n体验这里的挑战;\n成为这里的主人;\n加入百度,加入网页搜索,你,可以影响世界。\n");
console.log("请将简历发送至 %c ps_recruiter@baidu.com( 邮件标题请以“姓名-应聘XX职位-来自console”命名)","color:red");
console.log("职位介绍:http://dwz.cn/hr2013")}
}catch(e){};
</script>
</body>
</html>