HTML 中 URL 传值。
来源:互联网 发布:施工图设计优化 编辑:程序博客网 时间:2024/06/05 02:25
a.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><script>function a(){var input1 = document.getElementById("inputid");window.open("file:///C:/Users/So/Desktop/aw/b.html?inputStr=" + input1.value);//传入参数(其中,括号里面为程序文件地址)}</script><input type = "text" id = "inputid"><input type = "button" onclick = "a()" value = "提交"><input onclick='window.location="view-source:" + window.location.href' type="button" value="查看源文件" name="Button7"></body></html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><script>//获得参数的方法var request = { QueryString : function(val) { var uri = window.location.search; var re = new RegExp("" +val+ "=([^&?]*)", "ig"); return ((uri.match(re))?(uri.match(re)[0].substr(val.length+1)):null); } }</script></head><body><script>//调用方法获得参数var b = request.QueryString("inputStr");alert(b);</script><input onclick='window.location="view-source:" + window.location.href' type="button" value="查看源文件" name="Button7"></body></html>
0 0
- HTML 中 URL 传值。
- HTML中url引用
- Html中截取url参数 实现HTML间的url传值
- 论HTML中相对URL的选取
- c# 提取HTML中所有图片URL
- 论HTML中相对URL的选取
- HTML URL
- HTML-URL
- HTML URL
- html 传值之url 传值
- 使用javascript在html中获取url参数的脚本
- Loadrunner 中html 模式与URL模式的区别
- Loadrunner 中html 模式与URL模式的区别
- LoadRunner中URL和HTML两种录制方式
- HTML中接收URL参数的三种方式
- HTML中接收URL参数的三种方式
- HTML中接收URL参数的三种方式
- LR中,URL -based script与HTML -based script区别
- hdu 5671(模拟)
- 做Android整一年
- Eclipse查看和修改web项目部署位置
- poj-3080
- paho java log输出
- HTML 中 URL 传值。
- Android源码浅析(一)——VMware Workstation Pro和Ubuntu Kylin 16.04 LTS安装配置
- Java线程之1.5版新特性多生产者多消费者(四)
- iOS开发小技巧[003]:将约束值设置为一个带小数点的数
- hdu 5672
- (61)从零开始学习Nodejs[3]——Node TCP服务器&telnet,多客户端消息传递改进
- jquery [datatable]排序时指定某列不可排序
- Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared
- 霍夫变换