<HoverNodeStyle Font-Underline="False" />
<NodeStyle Font-Names="Verdana" Font-Size="8pt" ForeColor="Black"
HorizontalPadding="5px" NodeSpacing="0px" VerticalPadding="0px" />
<ParentNodeStyle Font-Bold="True" ForeColor="#5555DD" />
<SelectedNodeStyle Font-Underline="True" HorizontalPadding="0px"
VerticalPadding="0px" />
</asp:TreeView>
</div>
</form>
该页面中用到的js如下:
<script language="javascript" src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
function closewindow() {
this.window.opener = null;
window.close();
}
function submitname() {
if (jQuery("#" + ''<%=lblUser.ClientID %>'').text() == "") {
alert("请选择联系人");
return false;
}
else {
window.returnValue = jQuery("#" + ''<%=lblUser.ClientID %>'').text();
closewindow();
}
}
var previous_id = "";
function GetTreeNode() {
var evn = event;
if (evn.srcElement.innerText == undefined || evn.srcElement.innerText.length <= 0 || evn.srcElement.nameProp == undefined)
return true;
var id = evn.srcElement.id;
var a = document.getElementById(id);
var href = a.href;
var index = href.indexOf("#");
var englishName = href.substr(index + 1);
if (englishName != "") {
jQuery("#" + ''<%=lblUser.ClientID %>'').text(a.innerHTML + " (" + englishName + ")");
}
else {
return false;
}
if (previous_id != "") {
if (previous_id == id) {
}
else {
var backa = document.getElementById(previous_id);
if (backa != undefined) {
backa.style.backgroundColor = ""; //恢复默认
}
var a = document.getElementById(id);
a.style.backgroundColor = "#7FFFD4";
}
}
else {
a.style.backgroundColor = "#7FFFD4";
}
previous_id = id;
return false;
}
</script>
|