上一个按钮两种不同的操作 [英] Two different actions on one button
本文介绍了上一个按钮两种不同的操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经创建了我的观点的形式,调用控制器的一些方法。 我想要做的两件事情对我的提交按钮的功能:
I have created a form in my view that calls some method in controller. I want to do two things on my submit button function:
使用Ajax的功能,在同一页上显示输出,
Use Ajax function to display output on the same page,
获取使用$的数据(在相同的方法,它显示输出)这个 - >输入 - >后的功能
Get data (in the same method that is displaying the output) using $this->input->post function
推荐答案
您可以写上你的按钮......两个功能对于 TYPE =按钮
You can write two functions on your button ... For type="button"
<input type="button" value="Don't show this again! " onclick="function1();function2();" />
这篇关于上一个按钮两种不同的操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文