jquery没有进入下一页

编程入门 行业动态 更新时间:2024-10-27 10:24:45
本文介绍了jquery没有进入下一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有jquery,但它不会进入下一页,它总是显示图像并等待,永远不会进入下一页。

i have jquery, but it is not going to next page, it always display images and waits, never proceed to next page.

HTML code:

HTML code:

<div id="toHide" class="pb-text-align-center"> <img style="display: inline" src="img/load.gif" /> <form wicket:id="safeForm" class="clearfix"> <input type="hidden" wicket:id="submitted" value="false" /> </form> </div>

HTML查看来源:

<SCRIPT type="text/javascript"> var $ = jQuery.noConflict(); $('.toHide').show().doTimeout(100,function() { $('.toHide').find('safeForma3').submit();}); </SCRIPT>

wicket代码:

static private class SafeSubmitBehaviour extends AbstractBehavior{ public void onRendered( Component component ) { super.onRendered( component ); StringBuffer buffer = new StringBuffer(200); buffer.append("<script type=\"text/javascript\" >\n"); buffer.append("var $ = jQuery.noConflict();\n "); buffer.append(" $('.toHide').show().doTimeout(100,function() { $('.toHide').find('"); buffer.append(component.getMarkupId()).append("').submit();});\n</script>"); component.getResponse().write(buffer); } } buffer.append(component.getMarkupId()).append("').submit();});\n</script>");

我尝试过:$('。toHide')。find('form')。submit ();});.但仍然没有用。

i have tried with: $('.toHide').find('form').submit();});. But still no use.

将$('。toHide')转换为$('#toHide')后,页面将进入下一页,但动画未发生在IE6 / 7中,它在FF中工作正常。

After chaging $('.toHide') to $('#toHide'), page is going ot next page, but animation is not happening in IE6/7, it works fine in FF.

推荐答案

我认为你应该试试这个:

I think you should try this:

$('#toHide').find('form').submit();

或者如果表格上有ID(我不熟悉Wicket)你可以使用:

Or if the form has an ID on it (I'm not familiar with Wicket) you can just use:

$('#safeForm').submit();

ID选择器使用'#'字符,而不是'。',它是类选择器前缀。

The ID selector uses a '#' charactor, not a '.', which is the class selector prefix.

更多推荐

jquery没有进入下一页

本文发布于:2023-06-13 05:21:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/674852.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:下一页   jquery

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!