-3

I have button in the form, when loading the page that button need to click automatically , so i implemented trigger function in loading the page.but its keep on loading page ...

$(document).ready(function() {
$("#find").trigger('click');
}

<s:form action="productlist" id="searchForm" theme="simple" method="Post" onSubmit="FormSubmitHandler()">       
 <s:submit action="product" method="list" value="Find" />
</s:form>

Please advise.

4

1 回答 1

1

也许这就是问题的原因。 您没有正确关闭该功能。

$(document).ready(function() {
$('#find').trigger('click');
});

检查控制台(按 F12)查看错误消息。

于 2013-07-01T14:47:33.910 回答