asp.net 后台 修改 javascript 变量

 

        Util.JSSetChange(Page, GetType());

public static void JSSetChange(Page page, Type cstype) { // Define the name of the client scripts on the page. String csname1 = "ClickScript"; // Get a ClientScriptManager reference from the Page class. ClientScriptManager cs = page.ClientScript; // Check to see if the startup script is already registered. if (!cs.IsStartupScriptRegistered(cstype, csname1)) { String cstext1 = "hasChanged = true;"; //前台界面有个页面级别的变量叫hasChanged cs.RegisterStartupScript(cstype, csname1, cstext1, true); } }

 

posted @ 2015-09-28 13:06  webglcn  阅读(1026)  评论(0编辑  收藏  举报