script不刷新页面的联动前后代码_javascript技巧
程序员文章站
2022-04-03 10:09:18
...
复制代码 代码如下:
//后台代码
AjaxPro.Utility.RegisterTypeForAjax(typeof(bargain_class)); //本页页面名
//===============================ajax调用=====================================
[AjaxPro.AjaxMethod]
public string link(string name)
{
string text = "";
string sql = "select name from Management_products_class where pid='" + name + "'";
DataTable dt = LinkSql.conn(sql);
for (int i = 0; i {
if (text == "")
{
text = dt.Rows[i]["name"].ToString();
}
else
{
text += "," + dt.Rows[i]["name"].ToString();
}
}
return text;
}
上一篇: 总结6个对Java的常见误解实例
下一篇: java泛型的示例代码详解