JQuery中的查询字符串问题 [英] Query string problem in JQuery
本文介绍了JQuery中的查询字符串问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我试图通过编写下面的代码从jquery打开一个新窗口
Hello,
I am trying to open a new window from jquery by writing below code
window.open("pgPdfCreate.aspx?id=" + id + "&col=" + col + "&row=" + row + "&itemtype=" + itemtype + "&catname=" + catname + "&optionselected=" + optionselected + "&orient=" + orientation + "&from=" + from1+"&toemail="+toemail+"&subject="+subject+"¬es="+notes, "PDF Creation", "width=500,height=500");
它工作正常并打开一个新窗口但是当它关闭时,查询字符串被附加到页面URL从哪里这个窗口打开
所以我该如何解决这个问题?
it works fine and opens a new window but when it gets close the query string is appended to the page url from where this window gets open
so how can i solve this problem?
function PDFCreator() {
var id = $("#Catid").val();
var optionselected = $('input[name=type]:checked').val();
console.log("Selected="+optionselected);
var from1 = $("#from").val();
console.log("FROM="+from1);
var col = "";
var row = "";
var itemtype="";
var catname = "";
var orientation = "";
var toemail=$("#txtEmail").val();
var subject=$("#txtSub").val();
var notes=$("#txtNotes").val();
if (optionselected == "small") {
col = "3";
row = "5";
itemtype = "true";
orientation = "P";
}
else if (optionselected == "medium") {
col = "2";
row = "4";
itemtype = "true";
orientation = "P";
}
else if (optionselected == "large") {
col = "1";
row = "3";
itemtype = "true";
orientation = "P";
}
else if (optionselected == "individual") {
col = "1";
row = "1";
itemtype = "true";
orientation = "P";
}
closeDowloadDiaLog();
window.open("pgPdfCreate.aspx?id=" + id + "&col=" + col + "&row=" + row + "&itemtype=" + itemtype + "&catname=" + catname + "&optionselected=" + optionselected + "&orient=" + orientation + "&from=" + from1+"&toemail="+toemail+"&subject="+subject+"¬es="+notes, "PDF Creation", "width=500,height=500");
}
推荐答案
( #CATID跨度>)VAL();
var optionselected =
("#Catid").val(); var optionselected =
(' 输入[名=类型]:检查'跨度>)VAL();
console .log( Selected = 跨度> + optionselected);
var from1 =
('input[name=type]:checked').val(); console.log("Selected="+optionselected); var from1 =
( #从跨度>)VAL();
console .log( FROM = 跨度> + 1跳转);
var col = ;
var row = ;
var itemtype = ;
var catname = ;
var orientation = ;
var toemail =
("#from").val(); console.log("FROM="+from1); var col = ""; var row = ""; var itemtype=""; var catname = ""; var orientation = ""; var toemail=
这篇关于JQuery中的查询字符串问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文