jquery焦点事件.. [英] jquery focus event..

查看:82
本文介绍了jquery焦点事件..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Jquery的新手。任何人都可以帮我编写代码,当点击搜索按钮时焦点应该是在结果发生的时候。实际上在页面顶部有一些关于坐在那里的描述。 br $>
i写在下面一个..



I am new to Jquery..can anyone help me to write code for when search button is clicked the focus should be at results occured..Actually at the top of the page there is some description about the sit is there.
i have written below one..

<td class="textformcol">
@Html.TextBox("CategoryName", null, new { data_autocomplete_url = Url.Action("AutoComplete_Buyer"), @class = "textboxwdh200", id = "CategoryNameBuyer", maxlength = "30", onkeypress = "return isCharNumeric(this,event);" })
</td>
<td class="textform">
<input type="image" src="../../App_Themes/Themes/Images/button_submit.gif" id="BuyerSubmit" name="BuyerSubmit" />
</td>




<script language="javascript">
$(document).ready(function () {
$("#BuyerSubmit").click(function () {
debugger;
var Category = $('#CategoryNameBuyer').val();
url = 'business-buyer-leads?CategoryName=' + Category;
window.location = url;
$('#CategoryNameBuyer').focus();
});
});
</script>



但我没有得到所需的输出..谢谢提前。


But i am not getting the needed output..thanks in advance.

推荐答案

document )。ready( function (){
(document).ready(function () {


#BuyerSubmit)。click( function (){
debugger ;
var 类别=
("#BuyerSubmit").click(function () { debugger; var Category =


' #CategoryNameBuyer')。val();
url = ' business-buyer-leads?CategoryName =' + Category;
window location = url;
('#CategoryNameBuyer').val(); url = 'business-buyer-leads?CategoryName=' + Category; window.location = url;


这篇关于jquery焦点事件..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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