forked from 112liyao/work
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
unknown
committed
Feb 16, 2017
1 parent
ac0feb1
commit a9c7f18
Showing
4 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>practice</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.aptana.ide.core.unifiedBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.aptana.projects.webnature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title></title> | ||
</head> | ||
<style> | ||
div{ | ||
width:200px; | ||
height:200px; | ||
border:1px solid #000; | ||
} | ||
|
||
</style> | ||
<body> | ||
<div></div> | ||
<input type="button" value="按钮"/> | ||
<input type="button" value="暂停" class="two"/> | ||
<script> | ||
var input=document.querySelector(("input")); | ||
var end=document.querySelector((".two")); | ||
|
||
var div=document.querySelector("div"); | ||
input.onclick=function(){ | ||
var obj=new XMLHttpRequest(); | ||
obj.onloadend=function(){ | ||
var stu=obj.responseXML.getElementsByTagName("stu"); | ||
var str="<table>"; | ||
str+="<tr><th>"+"name"+"</th><th>"+"age"+"</th><th>"+"sex"+"</th></tr>"; | ||
for (var i=0;i<stu.length;i++){ | ||
str+="<tr><td>"+stu[i].getElementsByTagName('name')[0].innerHTML+"</td><td>"+stu[i].getElementsByTagName('age')[0].innerHTML+"</td><td>"+stu[i].getElementsByTagName('sex')[0].innerHTML+"</td></tr>" | ||
//这里的stu[i].getElementsByTagName('sex')[0].innerHTML是变量一定不能加''号,如同他下面的例子。 | ||
} | ||
str+="</table>"; | ||
div.innerHTML=str; | ||
} | ||
end.onclick=function(){ | ||
obj.abort() | ||
} | ||
obj.open("post","1.xml"); | ||
obj.setRequestHeader("Content-Type","application/x-www-form-urlencoded") | ||
obj.send("name=zhangsan&age=14") | ||
} | ||
// var a="sdflsdl"; | ||
// console.log("a") | ||
</script> | ||
<form action="" enctype="application/x-www-form-urlencoded"></form> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
<?php | ||
// sleep(2); | ||
echo $_POST["name"]; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<root> | ||
<stu> | ||
<name>秦鹏森</name> | ||
<age>11</age> | ||
<sex>男</sex> | ||
</stu> | ||
<stu> | ||
<name>秦鹏森</name> | ||
<age>11</age> | ||
<sex>男</sex> | ||
</stu> | ||
</root> |