这段ASP代码怎么转换成静态页面可用的代码

来源:百度知道 编辑:UC知道 时间:2024/06/01 07:49:08
<%if request("word")<>"" then
response.redirect "http://www.XXX.com/k?wd=dddd+"&request.form("word")&"&tnd=sss"
else%>
<form name="f1" action="" method=post>
<input name=word size="30" maxlength="100">
<input type="submit" value="搜索"></form>
<%end if%>

<html>
<script>
function gp(param)
{
var query = window.location.search;
var iLen = param.length;
var iStart = query.indexOf(param);
if (iStart == -1)
return "";
iStart += iLen + 1;
var iEnd = query.indexOf("&", iStart);
if (iEnd == -1)
return query.substring(iStart);

return query.substring(iStart, iEnd);
}
if (gp("word")!=""){
location.href="http://www.XXX.com/k?wd=dddd+"+gp("word")+"&tnd=sss";
}
</script>
<form name="f1" action="aa.html" method=get>
<input name=word size="30" maxlength="100">
<input type="submit" value="搜索"></form>

</html>

静态网页只能用<script></script><