ZhiYeJianKang_PeiXun/Song.Site/Manage/Scripts/Tester.js
2025-02-20 15:41:53 +08:00

18 lines
532 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//获取QueryString参数
jQuery.fn.getPara=function(para)
{
var LocString=String(window.document.location.href);
var rs=new RegExp("(^|)"+para+"=([^\&]*)(\&|$)","gi").exec(LocString),tmp;
if(tmp=rs)return tmp[2];
return "-1";
}
$(setTreeNodeState);
//设参数中id与节点id一致时当前节点特殊显示
function setTreeNodeState()
{
var id=$().getPara("id");
if(id=="-1")return;
var panel=$("div[type='MenuTree']");
var node=panel.find("div[type='text'][nodeId='"+id+"']");
node.attr("class","currentNode");
}