600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > html 通过一个搜索框搜索站内某个目录下的其他html文件

html 通过一个搜索框搜索站内某个目录下的其他html文件

时间:2021-04-17 13:12:19

相关推荐

html 通过一个搜索框搜索站内某个目录下的其他html文件

<!DOCTYPE html>

<html lang="zh">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>搜索</title>

</head>

<body>

<!-- <body bgcolor="pink"> -->

<fieldset>

<label for="search"> <strong>没有你要找的内容,试试搜索吧。</strong></label>

<input type="text" id="textid" value="" placeholder="请输入需要查找的日期,如:0718" style=";width:245px;"/>

<input type="button" value="搜索" οnclick="goto()" style=";font-size:14px;"/>

<script>

function goto() {

var str = document.getElementById("textid").value;

iframe.location.href = "/testdir/test_"+str+".html";

}

</script>

<br />

<iframe src=/home_page.html name="iframe" width=1200 height=800></iframe><br>

</fieldset>

</body>

home_page.html:为首页面

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。