本页内容是《用JavaScript接收html文件的参数》同时我们还提供济宁地区的网站建设,百度,雅虎,google的推广,点金,商友,等营销软件
请输入关键字:

标题搜索 内容搜索  

你现在所在的位置->首页->javascript->用JavaScript接收html文件的参数

用JavaScript接收html文件的参数

时间:[2006-12-25 14:09:01]     作者:作者不详

这个灵感是来于微软的FRAME指向的:
大家可以到
http://disapart.oso.com.cn/temp/urlinfo.html
做测试
////////////////例子:
<html><script>
var i=0;
function ol()
{
i=location.href.indexOf("?");
if(i!=-1)
{
str=location.href.substr(i+1,location.href.length-i-1);
alert(str);
document.open(true);
document.write(unescape(str));
document.close();
}
else
{
i=location.href.length;
}
}
function os()
{
str=location.href.substr(0,i)+"?"+document.all.tags("textarea").item(0).value;
location.href=str;
}
</script><body onload="ol()">
试试在下面输入HTML代码:<br>请注意:因为字符串没有编码,,所以加入的Script可能会有错误
<br><textarea cols=100 rows=20>
</textarea><br>
<button onclick="os()">看看结果</button>
</body></html>

【声明】本站刊载的《用JavaScript接收html文件的参数》一文如果有侵害你权益的情况,请联系我们。我们将及时采取措施。
QQ:44637339 Email:just6@163.com Tel:13355163107 Lining studios

友情链接

本页内容是《用JavaScript接收html文件的参数》 返回顶部
© 2001-2024 Lining studios 济宁速创科技有限公司, All Rights Reserved
 Processed Time:500.000ms
中华人民共和国信息产业部网站备案号: 鲁ICP备09103015号-1