高亮显示菜单链接加载的页面时 [英] Highlight a menu link when that page loaded
问题描述
我与网站工作。我使用的是母版页的网页。我需要根据显示页面时突出菜单链接。高亮意味着一些色彩也..我试过,但加载页面时,链路颜色显示。但加载页面,颜色消失..
我写了code在母版页页面加载事件的颜色。在code是如下:
I am working with a website. I am using a master page for web pages. I need to highlight the menu link when according page appears. Highlight means some color also.. I tried but when loading the page, the color for link is showing. But the page loaded, the color disappears.. I wrote the code for the color in master page page load event. The code is as follows.
那么,如何我可以根据页面加载??突出的链接按钮
So how I can highlight the link buttons according to page loads??
请帮忙...
感谢您提前....
推荐答案
这是因为你的链接按钮,在母版页。
所以写在页面的源代码code一个Java脚本如下:
This is because your link button is in master page. So write a java script in page's source code as follows.
<script>
var link=document.getElementById('<%=Master.FindControl("lbtnHome")%>');
link.style.color='red';
</script>
这可以帮助你。
这篇关于高亮显示菜单链接加载的页面时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!