界面添加内容检索功能

deploy
DESKTOP-4RNDQIC\29019 2021-05-24 23:24:19 +08:00
parent d9d4b86960
commit 55093f33af
2 changed files with 25 additions and 1 deletions

View File

@ -30,6 +30,31 @@
</select>
</form>
</li>
<li style="margin-top: 12px;">内容搜索</li>
<li style="margin-top: 12px" id="search">
<script type="text/javascript">
function content_change(){
console.log($("#term").val())
$.ajax({
type:"post",
url:"{{openapi}}api/doc_search_term",
contentType: "application/json",
async: false,
data :JSON.stringify({
term:$("#term").val()
}),
success: function(result) {
console.log(result)
},
dataType:"json"
},
);
}
</script>
<form style="margin-left: 5px;" oninput="content_change()">
<input type="text" id="term" >
</form>
</li>
</ul>
</div>
<div id='testdiv' style='height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;'>

View File

@ -265,7 +265,6 @@ function on_click_ddl(){
//获取iframe标签里body元素里的文字。即服务器响应过来的"上传成功"或"上传失败"
var word = $("iframe[name='frame1']").contents().find("body").text();
if (word != "") {
alert(word); //弹窗提示是否上传成功
clearInterval(t); //清除定时器
}
console.log(word)