我在想把b.aspx的内容通过POST方法传到a.aspx中间去.
首先我想获取form对象.然后修改他的action属性/.我想请问如何用js获取form对象,以及修改他的action属性.
forM对象的ID是form1!b.aspx和a.aspx是不同的2个工程里面的页面!
首先我想获取form对象.然后修改他的action属性/.我想请问如何用js获取form对象,以及修改他的action属性.
forM对象的ID是form1!b.aspx和a.aspx是不同的2个工程里面的页面!
html += (string.Format("</head><body onload=\"document.{0}.submit()\">", FormName));
html += (string.Format("<form name=\"{0}\" method=\"{1}\" action=\"{2}\" >", FormName, Method, Url));
try
{
for (int i = 0; i < Inputs.Keys.Count; i++)
{
html += (string.Format("<input name=\"{0}\" type=\"hidden\" value=\"{1}\">", Inputs.Keys[i], Inputs[Inputs.Keys[i]]));
}
html += ("</form>");
html += ("</body></html>"); System.Web.HttpContext.Current.Response.Write(html);