js把文本框中的内容在url地址栏上显示 如图:<a href="http//localhost/index.php?msg=内容">提交</a>对应的 a中‘内容’代码怎么写?文本域中的代码怎么写?如果有懂的,请写个详细实例。非常感谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <form action="index.php" method = "get" id="theforever"> <input type=text name=msg /><a href="javascript:theforever_csdn();">提交</a></form><script>function theforever_csdn(){ document.getElementById("theforever").submit();}<script> <a href="javascript:;" onclick="Fun()">提交</a>function Fun(){window.location.href="http//localhost/index.php?msg="+document.getElementById("文本ID").value+"";} 测试这种方法后,发现提交后的地址会显示本地地址;如 “本地地址+"http//localhost/index.php?。”怎么去掉本地地址前缀 <html><head></head><body><form id=form1 style="display: none;" method=get action="http//localhost/index.php"><input type=hidden name=msg value="内容"></form><input type=button value=提交 onclick=form1.submit()></body></html> JS中 这类问题是怎么解决的 ie9 js判断文件上传大小 大伙来看看这个是怎么个原理? 怎样才能保护自己的js源码呢? javascript 对象可否如下定义? 在JavaScript中如何定义全局变量,以及如何在函数中改变该全局变量的值? 怎么实现DIV容器?? 这段代码为什么会出错? [求救]如何屏蔽、恢复javascript中的事件处理函数?[求救] 求一个正则表达式? 请教firefox的js兼容性问题 extjs combobox的取值
<input type=text name=msg />
<a href="javascript:theforever_csdn();">提交</a>
</form>
<script>
function theforever_csdn(){
document.getElementById("theforever").submit();
}
<script>
function Fun(){window.location.href="http//localhost/index.php?msg="+document.getElementById("文本ID").value+"";}
怎么去掉本地地址前缀
<head>
</head>
<body>
<form id=form1 style="display: none;" method=get action="http//localhost/index.php">
<input type=hidden name=msg value="内容">
</form>
<input type=button value=提交 onclick=form1.submit()>
</body>
</html>