相关疑难解决方法(0)

将jquery中的多个参数从一个页面传递到另一个页面

我想在winRT应用程序中使用jQuery将jQuery从一个页面传递到另一个页面.使用一个参数完成.如何传递多个参数并在第二页中检索?

编码一个参数.

default.html:

<html>
<head>
<script>
       $(document).ready(function () {
        $(function () {
            $('#navigate12').click(function () {
                var te = $("#text1").val();
                var tea = $("#text2").val();
                 window.location.href = "/page.html?cal=" + te; 
                   });
        });});
</script>
</head>
<body>
 <button id="navigate12">navigate</button>
 <input id="text1" type="text"/>
 <input id="text2" type="text"/>
 <input id="text3" type="text"/>
 <input id="text4" type="text"/>
</body>
</html>

 page.html
<html>
<head>
      <script src="/js/jquery-1.9.1.js"></script>
      <script>
              $(document).ready(function () {                  
                function qs() {
                var qsparam = new Array();
                var query = window.location.search.substring(1);
                var parms = query.split('&');
                for (var i = 0; …
Run Code Online (Sandbox Code Playgroud)

navigation variables parameters jquery winjs

3
推荐指数
2
解决办法
5万
查看次数

使用javascript/jQuery从url值开始的自动复选框

有没有办法或可以使用javascript/jQuery做到这一点?

基于链接的URL:第一个将检查类型A和类型B,第二个示例将检查类型D.

?type=A&type=C or ?type=D
Run Code Online (Sandbox Code Playgroud)

我目前的表格:

<form name="input" action="" method="post" ><br />
Select Type: <br />
<input type="checkbox" name = "type" value="A" /> A <br />
<input type="checkbox" name = "type" value="B"  /> B <br />
<input type="checkbox" name = "type" value="C"  /> C <br />
<input type="checkbox" name = "type" value="D" /> D <br /> <br />
<input type="submit" value="Submit" />
Run Code Online (Sandbox Code Playgroud)

有任何提示并建议这样做吗?

javascript jquery checkboxlist

2
推荐指数
1
解决办法
4532
查看次数

根据查询字符串值显示/隐藏元素

在页面上有一些div元素,默认情况下我需要隐藏,直到提交表单并且用户重定向回同一页面,并在查询字符串后附加到URL(?success = true).

有人可以帮忙吗?

jquery

2
推荐指数
1
解决办法
5010
查看次数

如何从.js文件的url获取变量?

示例:假设当前页面url(window.location.href)是http://example.com/page.html html页面源代码是......

<html><head></head><body>
<script src="http://example.com/script.js?user=Ankit&ptid=18"></script>
</body></html>
Run Code Online (Sandbox Code Playgroud)

现在我需要在script.js中使用'src'变量并且脚本文件script.js应该返回

var a="Ankit"
var b="18"
Run Code Online (Sandbox Code Playgroud)

我们可以在php中使用echo $ _GET之类的东西吗?

javascript php variables url get

1
推荐指数
1
解决办法
2246
查看次数

使用javascript获取包含GET变量的路径

我需要获取整个页面路径(不包括域名),以便我可以在iframe中显示它.

我目前location.pathname用来获取路径,但问题是它们可能GET在URL中出现变量.

因此对于像article.php?id=23我只article.php使用的页面一样location.pathname,因此显示的页面iframe只是一个404页面.

是否有任何函数来获取包含GET变量的路径?

javascript regex url

1
推荐指数
1
解决办法
973
查看次数

标签 统计

javascript ×3

jquery ×3

url ×2

variables ×2

checkboxlist ×1

get ×1

navigation ×1

parameters ×1

php ×1

regex ×1

winjs ×1