-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1、不知道怎么把 从服务端返回的两个准确率值 传到js里面去 再异步刷新显示到界面上 2、还要把测试的详细信息给做出来
- Loading branch information
Showing
12 changed files
with
81 additions
and
40 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
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
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
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 |
---|---|---|
|
@@ -65,6 +65,7 @@ | |
<tbody id="tbody"> | ||
|
||
</tbody> | ||
|
||
</table> | ||
</div> | ||
</fieldset> | ||
|
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
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
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 |
---|---|---|
@@ -1,60 +1,81 @@ | ||
|
||
var testing = document.getElementById("testing"); | ||
var stopButton = document.getElementById("stopButton"); | ||
var pauseButton = document.getElementById("pauseButton"); | ||
|
||
//add events to those 2 buttons | ||
testing.addEventListener("click", testing); | ||
testing.addEventListener("click", formsubmit); | ||
|
||
function formsubmit() { | ||
console.log("formsubmit clicked"); | ||
|
||
//新建一行 | ||
add(); | ||
} | ||
|
||
|
||
var num=0; | ||
function add(blob){ | ||
var req; | ||
function add(){ | ||
num++; | ||
var tr=document.createElement("tr"); | ||
// 新建一项 | ||
// 1.新建一项 | ||
var id=document.createElement("td"); | ||
var dur=document.createElement("td"); | ||
var noise=document.createElement("td"); | ||
var sample=document.createElement("td"); | ||
var zql1=document.createElement("td"); | ||
var zql2=document.createElement("td"); | ||
var exec=document.createElement("td"); | ||
|
||
id.innerHTML=num; | ||
dur.innerHTML=document.getElementByName("time"); | ||
noise.innerHTML=document.getElementByName("fre"); | ||
sample.innerHTML=document.getElementByName("sample"); | ||
|
||
var time = $('input[name=time]:checked').val(); | ||
var fre = $('input[name=fre]:checked').val(); | ||
var samplenum = $('input[name=sample]:checked').val(); | ||
|
||
// 2.填内容 | ||
dur.innerHTML=time; | ||
noise.innerHTML=fre; | ||
sample.innerHTML=samplenum; | ||
|
||
var tab=document.getElementById("table"); | ||
var tbody=document.getElementById("tbody"); | ||
tbody.appendChild(tr); | ||
//id加到表里 | ||
// 3.id加到表里 | ||
tr.appendChild(id); | ||
tr.appendChild(dur); | ||
tr.appendChild(noise); | ||
tr.appendChild(sample); | ||
|
||
var test = getElementById("testing"); | ||
//var upload = document.createElement('a'); | ||
|
||
req="test?time="+time+"&fre="+fre+"&sample="+samplenum; | ||
alert(req); | ||
var exectest = document.createElement('a'); | ||
//upload.href="#"; | ||
//upload.innerHTML = "Search"; | ||
test.addEventListener("click", function(event){ | ||
exectest.innerHTML = "开始测试"; | ||
exectest.addEventListener("click", function(event){ | ||
var xhr=new XMLHttpRequest(); | ||
alert("1:"+xhr.status); | ||
//设置响应返回的数据格式 | ||
//xhr.responseType = "document"; | ||
//注册相关事件回调处理函数,onload当请求成功完成时触发,此时xhr.readystate=4 | ||
xhr.onload=function(e) { | ||
alert("2:"+xhr.status); | ||
if(this.readyState === 4) { | ||
alert("3:"+xhr.status); | ||
console.log("Server returned: ",e.target.responseText); | ||
//document.getElementById("results").innerHTML=e.target.responseText; | ||
console.log("allheaders: ",xhr.getAllResponseHeaders()); | ||
|
||
$.get("test", function(data) { | ||
alert("zql1:" + data.zql + "\nzql2:" + data.zql); | ||
}); | ||
} | ||
}; | ||
xhr.open("POST","test",true); //异步 | ||
}) | ||
alert("4:"+xhr.status); | ||
//打开连接 | ||
xhr.open("POST",req,true); //异步 | ||
//发送请求 必须有send | ||
xhr.send(); | ||
}); | ||
tr.appendChild(exec); | ||
exec.appendChild(exectest); | ||
|
||
} |
Binary file modified
BIN
+157 Bytes
(100%)
NewAudioR/target/classes/com/audio/controller/AudioController.class
Binary file not shown.
Binary file modified
BIN
+107 Bytes
(110%)
NewAudioR/target/classes/com/audio/service/AudioService.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
NewAudioR/target/classes/com/audio/service/impl/AudioServiceImpl$1.class
Binary file not shown.
Binary file modified
BIN
+524 Bytes
(100%)
NewAudioR/target/classes/com/audio/service/impl/AudioServiceImpl.class
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
NewAudioR/target/m2e-wtp/web-resources/META-INF/maven/com.audio/NewAudioR/pom.properties
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