后台代码
//后台调用前台js代码 addAClass()函数 注意:addAClass()一定要写在head里不然可能读不到
ScriptManager.RegisterStartupScript(this, this.GetType(), "edit", "addAClass();", true);
前台
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script src="../jquery-easyui-1.3.4/jquery-1.4.2.min.js"></script>
<link rel="stylesheet" href="~/Css/style.css" type="text/css" />
<script type="text/javascript">
//为基础设置 用户信息管理 工资管理添加类 使<a>可用
function addAClass() {
$('#divBaseSetting').removeClass('menubtn-BaseSetting1').addClass('menubtn-BaseSetting');
$('#divUserInfo').removeClass('menubtn-UserInfo1').addClass('menubtn-UserInfo');
$('#divSalaryManagement').removeClass('menubtn-SalaryManagement1').addClass('menubtn-SalaryManagement');
}
</script>
</head>
<body>
<form runat="server">
<div class="center" id="divMenu">
<div id="divBaseSetting" class="menubtn-BaseSetting1"><a href="Default.aspx"></a></div>
<div id="divUserInfo" class="menubtn-UserInfo1"><a href="UserCheck.aspx"></a></div>
<div id="divSalaryManagement" class="menubtn-SalaryManagement1"><a href="PayrollManagement.aspx"></a></div>
<div id="divPersonalInfo" class="menubtn-PersonalInfoSetting"><a href="../UserInfo.aspx"></a></div>
</div>
</form>
</body>
</html>