
在搜索框内输入关键词后,点击搜索然后进入一个页面,要求页面可以抓取到之前所输入的关键词
html代码:<formaction="/weixin/index.php"class="search-form"onsubmit="returncheck()"targ...
html代码:
<form action="/weixin/index.php" class="search-form" onsubmit="return check()" target="_blank">
<input type="hidden" name="kwtype" value="0">
<input type="hidden" name="searchtype" value="title">
<input type="text" name="q" class="search-input" placeholder="请输入需要咨询的症状或疾病词">
<input type="submit" value="" class="search-submit">
</form>
// 调用方法
var $wd=GetQueryString("wd");
if($wd&&$wd.length>0){}else{$wd=GetQueryString("word")}
if($wd&&$wd.length>0){
$wd=decodeURIComponent($wd);
$line='关于【“'+$wd+'”】的问题,很荣幸为您解答疑问!';
}else{
$line='很荣幸为您解答疑问!';
} 展开
<form action="/weixin/index.php" class="search-form" onsubmit="return check()" target="_blank">
<input type="hidden" name="kwtype" value="0">
<input type="hidden" name="searchtype" value="title">
<input type="text" name="q" class="search-input" placeholder="请输入需要咨询的症状或疾病词">
<input type="submit" value="" class="search-submit">
</form>
// 调用方法
var $wd=GetQueryString("wd");
if($wd&&$wd.length>0){}else{$wd=GetQueryString("word")}
if($wd&&$wd.length>0){
$wd=decodeURIComponent($wd);
$line='关于【“'+$wd+'”】的问题,很荣幸为您解答疑问!';
}else{
$line='很荣幸为您解答疑问!';
} 展开
展开全部
您的form表单提交,已经传值给你的weixin/index.php,所有index.php 已经可以接收到输入框的值,$_POST['q']直接获取就行,如果其他页面要用也可以用php再传到您需要的页面!感谢采纳!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询