怎么把输入框里的值作为参数,加在连接地址里? <a href="http://www.abc.com/search.asp?keyword=document.getElementById('b').value">提交 </a> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这个其实简单了:<html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>无标题页</title> <script language="javascript" type="text/javascript"> function f_href() { window.open("http://www.abc.com/search.asp?keyword="+document.all("b").value); } </script></head><body> <form id="form1" runat="server"> <div> <input name="b" type="text" id="b" /> <a href="#" onclick="javascript:f_href();">提交 </a> </div> </form></body></html> <input name="b" type="text" id="b" /> <a href="" onmousedown="javascript:if(document.getElementById('b').value!="")this.href='http://www.abc.com/search.asp?keyword='+document.getElementById('b').value; else {this.href=window.location.href+'#';alert('为空不能提交');}">提交 </a> javascript扩展Function后出的问题?求解答 js的原型继承问题,有些不解... JavaScript操作json 请问javascript的all问题? 这段 JQUERY 代码,怎么执行不了? javaScript树形结构,急救! 求javascript replace的详细帮助文档 如何在窗口关闭时候写程序 一段js菜单脚本求注释。。。 如何在一个Iframe中调用别外一个Iframe中的标签?在线等待!!! 如何实现层的伸缩? 关于层得问题~~~
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script language="javascript" type="text/javascript">
function f_href()
{
window.open("http://www.abc.com/search.asp?keyword="+document.all("b").value);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input name="b" type="text" id="b" />
<a href="#" onclick="javascript:f_href();">提交 </a>
</div>
</form>
</body>
</html>
<a href="" onmousedown="javascript:if(document.getElementById('b').value!="")this.href='http://www.abc.com/search.asp?keyword='+document.getElementById('b').value; else {this.href=window.location.href+'#';alert('为空不能提交');}">提交 </a>