为什么我按钮点击到后台的时候总是去刷新呢 为什么我按钮点击到后台的时候总是去刷新呢,有没有什么方法可以不刷新,AJAX怎么用呢具体的,我不会啊,各位大哥救 救 小弟吧 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 看看这个http://topic.csdn.net/u/20080831/21/73dfa3c9-93ef-4b30-8fca-4f893a8b49cf.html $(function(){ $('#<%= TextBox3.ClientID %>').keyup(function() { $.ajax({ url: 'WebService.asmx/GetInfoByName', type: 'POST', dataType:"xml", data:{'rname':$(this).val()}, cache:false, success: function(res) { var rdiv=$('#resultDiv'); rdiv.html(''); var tb="<table style='color:brown;font-size:12px;width:100%;'>" $(res).find('test').each(function() { tb+="<tr><td>"+$(this).text()+"</td></tr>";}) tb+="</table>"; rdiv.html(tb); rdiv.fadeIn(); rdiv.offset({ top: 100, left: 300 }); rdiv.find('td') .click(function() { $('#<%= TextBox3.ClientID %>').val($(this).text()); rdiv.fadeOut(); }) .each(function(){ $(this).css({"cursor":"hand"}); }); rdiv.find('tr').hover(function(){$(this).css("background-Color","honeydew");},function(){$(this).css("background-Color","");}); }, error: function(x, e) { alert(x.responseText); } }); }); }); 取消按鈕的默認事件,可用function btn_click(){ return false;} <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"><ContentTemplate></ContentTemplate><Triggers><asp:AsyncPostBackTrigger ControlID="按钮ID"/></Triggers></asp:UpdatePanel> page.ispostback属性应该可以控制吧 protected void Page_Load(object sender, EventArgs e) { }里面加if(!ispostback) Dreamweaver8“显示弹出式菜单”一直灰色??? 关于视频播放解决方案 获取值问题!!!! 如何取得cookie的过期时间? xml & xsl 一个比较复杂的问题```进来看``` 怎么实现强迫浏览器下载已知类型的文件 提问:用时间来控制控件? (setTimeout) 请教一个关于DataView的问题!(有高手能答出来嘛?) 重写了TextBox,希望当用户按下回车时执行指定的事件,为什么RaisePostBackEvent没有运行呢? 关于编码问题 请问怎么控制后台数据在前台显示的位置呢?
http://topic.csdn.net/u/20080831/21/73dfa3c9-93ef-4b30-8fca-4f893a8b49cf.html
$(function()
{
$('#<%= TextBox3.ClientID %>').keyup(function()
{
$.ajax({
url: 'WebService.asmx/GetInfoByName',
type: 'POST',
dataType:"xml",
data:{'rname':$(this).val()},
cache:false,
success: function(res)
{
var rdiv=$('#resultDiv');
rdiv.html('');
var tb="<table style='color:brown;font-size:12px;width:100%;'>"
$(res).find('test').each(function() { tb+="<tr><td>"+$(this).text()+"</td></tr>";})
tb+="</table>";
rdiv.html(tb);
rdiv.fadeIn();
rdiv.offset({ top: 100, left: 300 });
rdiv.find('td')
.click(function() { $('#<%= TextBox3.ClientID %>').val($(this).text()); rdiv.fadeOut(); })
.each(function(){ $(this).css({"cursor":"hand"}); });
rdiv.find('tr').hover(function(){$(this).css("background-Color","honeydew");},function(){$(this).css("background-Color","");});
},
error: function(x, e)
{
alert(x.responseText);
}
}); });
});
function btn_click()
{
return false;
}
<ContentTemplate>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="按钮ID"/>
</Triggers>
</asp:UpdatePanel>
{ }
里面加if(!ispostback)