我在 asp:content 中有一个 div:
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div id="slidebar" style="display:none;" >There are some pending approvals.Please approve by the 25th of this month
<a href="#" id="slink" style="margin-left:10px;" onclick="fade('slidebar');">Click here to close <sup style="font:caption;color:#373636;">X</sup></a>
</div>
<script language="javascript" type="text/javascript">
function showbanner()
{
document.getElementById("slidebar").style.visibility="visible";
}
</script>
<\asp:content>
以及背后的代码:
ClientScript.RegisterClientScriptBlock(Page.GetType(), "displaybanner", "return showbanner();", true);
我无法从后面的代码中调用函数 showbanner,即使我使用 registerclientscript 直接调用 showbanner 内的语句......它也不会被调用。
请帮忙