Pat*_*cow 2 forms jquery input
我有一个形式的输入按钮:
<input type="submit" value="" class="hidde" name="free" id="helpdiv" onmouseover="this.style.background='url('../images/thank_you/thank.png');'" onmouseout="this.style.background='url('../images/thank_you/thank_you.png');'" style="width: 236px; height: 127px;">
Run Code Online (Sandbox Code Playgroud)
和具有事件的jQuery脚本:
onlike:function(response){
$('.uncontent').hide('fade');
$('input#helpdiv').trigger('click');
}
Run Code Online (Sandbox Code Playgroud)
当该函数触发时,我也希望触发输入按钮。该函数正在工作,因为$('.uncontent').hide('fade');
被触发了
有任何想法吗?
编辑:
$('input#helpdiv').trigger('click')
要么
$('input#helpdiv').click()
由于某种原因将无法正常工作
尝试...
$('#helpdiv').click();
Run Code Online (Sandbox Code Playgroud)
如果您尝试通过此按钮提交表单<form>
,请选择该元素,然后像这样调用其commit()。...
$('#helpdiv').parents('form').eq(0).submit();
Run Code Online (Sandbox Code Playgroud)