0
我有一個javascript,在我的gridview上添加了一個搜索框。它加載與頁面:在aspx計時器內執行javascript
<script type="text/javascript">
$(document).ready(function() {
$('<thead></thead>').prependTo('table#ctl00_MainContent_GVOPL').append($('table#ctl00_MainContent_GVOPL tr:first'));
$('table#ctl00_MainContent_GVOPL tbody tr').quicksearch({
reset: true,
resetClass: "resetButton",
resetLabel: "Zurücksetzen",
position: 'before',
attached: 'table#ctl00_MainContent_GVOPL',
stripeRowClass: ['odd', 'even']
});
$(".qs_input").focus();
});
具有定時更新我在GridView。第一次更新後,搜索框消失。這個想法是添加JavaScript來執行也在計時器。但我該怎麼做?
定時器:
<asp:Timer ID="Timer1" runat="server" Interval="5000" ontick="Timer1_Tick" />
protected void Timer1_Tick(object sender, EventArgs e)
{
...build my gridview...
}
嘗試這樣的: - http://stackoverflow.com/a/4994129/7036750 –