<?php if($_GET['virtual_get']){//Code You Want To Run}
具体Javascript代码
var FormElement = document.createElement('form')
var submit = document.createElement('input')FormElement.setAttribute('method','get')FormElement.setAttribute('action','?')submit.setAttribute('type','submit')FormElement.appendChild(submit)submit.click()
嗯,可以使用iframe
怎么样是不是很酷,完全没有服务器端和数据库
<html><head>
<meta http-equiv="Content-Type" content="text/html charset=utf-8" />
<title>搜索大集合</title>
<style type="text/css">
*{ margin:0px padding:0px}
body{ overflow:hidden}
#top{border-bottom:2px solid #669 padding:6pxbackground:rgba(102,153,204,0.6) position:fixed width:100% text-align:center}
#iframe1{width:100%height:100%}
</style>
</head>
<body>
<div id="top">
<input name="keyword" type="text" id="keyword" />
<select name="lx" id="lx">
<option value="5">百度搜索</option>
<option value="6">搜搜搜索</option>
<option value="7">搜狗搜索</option>
<option value="8">360搜索</option>
<option value="9">有道搜索</option>
<option value="10">雅虎搜索</option>
<option value="11">必应搜索</option>
</select>
<input name="sumb" type="button" id="sumb" value="搜索" />
</div>
<iframe id="iframe1" name="iframe1" frameborder=0 ></iframe>
<script type="text/javascript">
var iframe1=document.getElementById("iframe1")
document.getElementById("sumb").onclick=flss
function flss(){
var lx=document.getElementById("lx")
var key=document.getElementById("keyword").value
if(key==""){alert('关键字不能为空')return false}
switch(lx.value){
case '1':
iframe1.src='http://s.weibo.com/weibo/'+key
break
case '2':
iframe1.src='http://search.t.qq.com/index.php?k='+key
break
case '3':
iframe1.src='http://t.sohu.com/twsearch/twSearch?key='+key
break
case '4':
iframe1.src='http://t.163.com/tag/'+key
break
case '5':
iframe1.src='http://www.baidu.com/s?&wd='+key
break
case '6':
iframe1.src='http://www.soso.com/q?w='+key
break
case '7':
iframe1.src='http://www.sogou.com/web?query='+key
break
case '8':
iframe1.src='http://www.so.com/s?q='+key
break
case '9':
iframe1.src='http://www.youdao.com/search?q='+key
break
case '10':
iframe1.src='http://www.yahoo.cn/s?q='+key
break
case '11':
iframe1.src='http://cn.bing.com/search?q='+key
break
}
}
</script>
</body>
</html>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)