Php responds to the button onclick event. I use the codeigniter framework in php to reference the smart template. how does the button event controller on the page respond to this issue? thank you. It is best to give an example.
Reply to discussion (solution)
Asynchronous PHP request using JS
Can you give an example?
Baidu ajax Synchronous Asynchronous int
Is there any other way? I am a rookie, humbly consult Daniel: Thank youfunction Check (){}******************************************************************************You can pass the object itself to a function in the check method. This allows you to get the attribute equivalent of the click button itself. Then, depending on the values of your button properties, you can make a branch decision as follows:
InputButtonButton,Jump Link, Method:
1. If you want to make this pageTurn to new pageUse:
Window. Location. href ('connection ')">
2. If you needOpen a new page for redirection, Use:
Window. Open ('connection ')">
Window. Location. Reload ()">
Window. History. Go (1)">
Window. History. Go (0)">
Window. History. Go (-1)">
Window. History. Forward ()">
Window. History. Back ()">
Back + refresh
Window. History. Go (-1); window. Location. Reload ()">
3. open a new window wi
Can be embedded in the background code JSThe front desk writes code function XXX () {------}Button event:protected void Button_Click (object sender, EventArgs e){////Background code in front, behind the mosaic JS Clientscript.registerstartupscript (Page.gettype (), "", "xxx ();", true);Scriptmanager.registerstartupscript (Gvwjolist, this. GetType (), "Magin", "xxx ()", true); }How do I make a button exe
Town Field Poem:The Pure Heart sentiment wisdom language, does not have the world name and the Benefit. Learn water under the hundred rivers, give up arrogant slow meaning.Learn to have a small return to feed root, willing to cast a conscience blog. Sincere in this writing experience, willing to see the text to Inspire.——————————————————————————————————————————CodeResult——————————————————————————————————————————The essence of the blog, in the technical part, more in the town yard a Poem. ide:vs2
Sometimes you need to add an onclik event to the DataGrid, for example, when you delete a record, you are prompted to delete the alert dialog box, which can be written as follows.
Private void grdplan_itemdatabound (Object sender, system. Web. UI. webcontrols. datagriditemeventargs E)
{
If (E. Item. itemtype = listitemtype. Item | E. Item. itemtype = listitemtype. alternatingitem)
{
Tablecell cell = new tablecell ();
Cell = E. Item. cells [2];
System. Web. UI. webcontrols. linkbutton LBN = new l
First of all, I do not write JS code. The browser's compatibility accumulation experience is not enough, especially IE6, 7, 8 of the compatibility, summed up this article so that they accumulate with everyone, less time to spend unnecessary.
Here is my JS code:
/**** Save modified data* @return*/function Saveconten () {$.ajax ({Type: "POST",URL: "Emp.do?param=updateempinfo",data:{"EmpId": $ ("#empId"). Val (),"EmpNo": $ ("#empNo"). Val (),"EmpName": $ ("#empName"). Val (),"Emploginname": $ ("#em
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->// Customize the event process. The process name can be any one
Procedure tform1.onclick (Sender: tobject );
Begin
If sender is tbutton then
Begin
If tbutton (sender). Name = 'button1' then
...
Else if tbutton (sender). Name = 'button2' then
...
End;
End;
// Create tbuttonVaRBTN: tbutton;
BeginBTN: = tbutton. Create (application );BT
Town Field Poem:The Pure Heart sentiment wisdom language, does not have the world name and the benefit. Learn water under the hundred rivers, give up arrogant slow meaning.Learn to have a small return to feed root, willing to cast a conscience blog. Sincere in this writing experience, willing to see the text to inspire.——————————————————————————————————————————CodeResultFeelings:It's too flexible ...——————————————————————————————————————————The essence of the blog, in the technical part, more in
1. In order to test, we also set the view OnTouch ontouchevent OnClick onlongclick four events, after the printing test found that the key distribution process is this if the short press:ontouch-->> Ontouchevent--->>onclick. Long press: ontouch-->>ontouchevent--->>onlongclick-->>onclick. Why would that be?We look at the view sourcepublic boolean dispatchtoucheven
Tag: TR onclick TD onclick event bindingIE event.stoppropagation () block bubbling events in Firefox Firefox , opera, ie block bubble event is different code, Firefox use is event.stoppropagation (), and IE under the use of cancelbubble , JQuery can be compatible with e.stoppropagation (), and if it is purely JavaScript requires the following code to unify: if (event.stoppropagation) {//This code was
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.