1. Background method
public string AA(string cc)
{
string dd = "Hello everyone is really good";
string message=dd cc;
return message;
}
Front-end JS
function Init() {
var v = "China";
var s = '<%=AA("' v '") %>';
alert(s);
}
2. Post submission PVISAjax.aspx is the processed page
The data in {} is the parameter
data is the returned data
$.post("PVISAjax.aspx", { Method: "PLANT", PlantName: plantName }, function (data) {
if (data != null) {
list = new Array(); //Split characters
list = data.split(",");
var gfoN = list[0];
var grfoN = list[1];
var elN = list[2];
var ulN = list[3];
var etbaN = list[4];
gfo.SetValue(gfoN);
grfo.SetValue(grfoN);
exeuro.SetValue(elN);
exusd.SetValue(ulN);
etba.SetValue(etbaN);
pvisName.SetValue(etbaN);
etba.mainElement.title = etbaN;
}
});
Backend Convert.ToString(Request["PlantName"]);Receive the passed parameters
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn