本文主要是介绍html和ashx之间的传值以及js和aspx传值,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
html 代码
var content = window.location.href;
var ori = content.split('?')
console.log(ori[1])
GetJsonByUrl2("getData_stock2.ashx?workline=" + ori[1], get_html);
$.ajax({
type: "post",
url: "Handler1.ashx",
data: { shuru},
success: function (data) {
document.getElementById("content").innerHTML = data;
}
});
getData_stock2.ashx代码、
context.Response.ContentType = "text/plain";
//string ORGID = Convert.ToString(context.Session["ORGID"])
string or = context.Request["workline"];
Handler1.ashx代码
public string shuru;
shuru=context.Request["shuru"].ToString();
JS代码
window.location.href="Programs/calendar/workday2/calendar.aspx?workline="+workline;
calendar.aspx代码
public string workline;
workline= Context.Request["workline"];
这篇关于html和ashx之间的传值以及js和aspx传值的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!