同时调用JQuery和VB函数 [英] Calling JQuery and VB function on the same time

查看:99
本文介绍了同时调用JQuery和VB函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在一个按钮上同时调用JQuery和VB函数,但是在调用它时遇到问题,JQuery不能正常工作。 

Hi, I want to call JQuery and VB function on the same time in one button, but I have a problem when calling them, the JQuery didn't work. 

我有这个按钮:

<asp:Button ID="Display" runat="server" Text="Tampilkan" />	

虽然我背面有VB功能但是:

while I have VB function on the back it:

Protected Sub Display_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Display.Click
 // my code 
End Sub

和这个用于向下滚动到下一个div的JQuery脚本:  

and this JQuery script for scrolling down to the next div: 

<script type="text/javascript">				
	$(function(){
		$("#<%=Display.ClientID %>").click(function(){							
			//scroll to the second div 
			$('html,body').animate({
			scrollTop: $(".secondrow").offset().top },
			'slow');
		});
	});	
</script>				

问题是当VB函数和JQuery同时触发时,JQuery应该关闭,它回到了第一位,VB函数是工作。 

The problem is while the VB function and the JQuery are firing on the same time, the JQuery which should go down, it went back to the first place and the VB function is work. 

感谢您的帮助

推荐答案

您好,

请考虑在这里询问

https://forums.asp.net/


这篇关于同时调用JQuery和VB函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆