扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
在本页阅读全文(共19页)
<script language="JavaScript"> function showHideContent(id, show) { var elem = document.getElementById(id); if (elem) { if (show) { elem.style.display = 'block'; elem.style.visibility = 'visible'; } else { elem.style.display = 'none'; elem.style.visibility = 'hidden'; } } } </script> <div id="someRegion"> This text will be displayed or hidden when clicking the appropriate button below... </div> <input type="button" value = "Hide Content" onclick="showHideContent('someRegion', false);"> <input type="button" value = "Show Content" onclick="showHideContent('someRegion', true);"> |
<asp:Repeater id="rptFAQs" runat="server"> <ItemTemplate> <h2><%# DataBinder.Eval(Container.DataItem, "Description") %></h2><br /> <b>Submitted By:</b> <%# DataBinder.Eval(Container.DataItem, "SubmittedByName") %><br /> <b>Views:</b> <%# DataBinder.Eval(Container.DataItem, "ViewCount", "{0:d}") %><br /> <b>FAQ:</b><br /> <%# DataBinder.Eval(Container.DataItem, "Answer") %> </ItemTemplate> </asp:Repeater> |
<script language="JavaScript"> function ToggleDisplay(id) { var elem = document.getElementById('d' + id); if (elem) { if (elem.style.display != 'block') { elem.style.display = 'block'; elem.style.visibility = 'visible'; } else { elem.style.display = 'none'; elem.style.visibility = 'hidden'; } } } </script> <style> .header { font-size: larger; font-weight: bold; cursor: hand; cursor:pointer; background-color:#cccccc; font-family: Verdana; } .details { display:none; visibility:hidden; background-color:#eeeeee; font-family: Verdana; } </style> <asp:Repeater id="rptFAQs" runat="server"> <ItemTemplate> <div id='h<%# DataBinder.Eval(Container, "ItemIndex") %>' class="header" onclick='ToggleDisplay(<%# DataBinder.Eval(Container, "ItemIndex") %>);'> <%# DataBinder.Eval(Container.DataItem, "Description") %> </div> <div id='d<%# DataBinder.Eval(Container, "ItemIndex") %>' class="details"> <b>Submitted By:</b> <%# DataBinder.Eval(Container.DataItem, "SubmittedByName") %><br /> <b>Views:</b> <%# DataBinder.Eval(Container.DataItem, "ViewCount", "{0:d}") %><br /> <b>FAQ:</b><br /> <%# DataBinder.Eval(Container.DataItem, "Answer") %> </div> </ItemTemplate> </asp:Repeater> |
濠电姷顣介埀顒€鍟块埀顒€缍婇幃妯诲緞閹邦剛鐣洪梺闈浥堥弲婊勬叏濠婂牊鍋ㄦい鏍ㄧ〒閹藉啴鏌熼悜鈺傛珚鐎规洘宀稿畷鍫曞煛閸屾粍娈搁梻浣筋嚃閸ㄤ即宕㈤弽顐ュС闁挎稑瀚崰鍡樸亜閵堝懎濮┑鈽嗗亝濠㈡ê螞濡ゅ懏鍋傛繛鍡樻尭鐎氬鏌嶈閸撶喎顕i渚婄矗濞撴埃鍋撻柣娑欐崌閺屾稑鈹戦崨顕呮▊缂備焦顨呴惌鍌炵嵁鎼淬劌鐒垫い鎺戝鐎氬銇勯弽銊ф噥缂佽妫濋弻鐔碱敇瑜嶉悘鑼磼鏉堛劎绠為柡灞芥喘閺佹劙宕熼鐘虫緰闂佽崵濮抽梽宥夊垂閽樺)锝夊礋椤栨稑娈滈梺纭呮硾椤洟鍩€椤掆偓閿曪妇妲愰弮鍫濈闁绘劕寮Δ鍛厸闁割偒鍋勯悘锕傛煕鐎n偆澧紒鍌涘笧閹瑰嫰鎼圭憴鍕靛晥闂備礁鎼€氱兘宕归柆宥呯;鐎广儱顦伴崕宥夋煕閺囥劌澧ù鐘趁湁闁挎繂妫楅埢鏇㈡煃瑜滈崜姘跺蓟閵娧勵偨闁绘劕顕埢鏇㈡倵閿濆倹娅囨い蹇涗憾閺屾洟宕遍鐔奉伓