使用javascript或jquery自动触发按钮事件 [英] Automatically fired button event using javascript or jquery

查看:399
本文介绍了使用javascript或jquery自动触发按钮事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我将一个页面重定向到另一个页面意味着按钮事件自动触发...同时我提到onclientclick事件方法可以自动触发...是否有可能



如果有人知道这个解决方案.........



< input type =buttonrunat =servervalue = 保存id =保存/>

if i redirect one page to another page means button event automatically fired... at the same time i mention onclientclick Event method can fired automatically... is it possible or not

if anyone know this solution.........

<input type="button" runat="server" value="Save" id="save" />

推荐答案

使用 jquery文档加载方法 [ ^ ]

use jquery document load method[^]
<script>


function (){


' #YourButtonId')。click();
});
< / script>
('#YourButtonId').click(); }); </script>





导航页面时,按钮将自动触发。



When the page is navigated, the button will be fired automatically.


这篇关于使用javascript或jquery自动触发按钮事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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