Ask: An error occurred while calling onclick in form. ask a Cainiao question:
The webpage I created has a submit button to submit the form content. However, because other processing is required, submit cannot be used directly. Instead, a button is used to call the onclick function. for details, see. the php code is as follows:
A. js code is as follows:
Function send ()
{
Alert ("test ");
...
}
I don't know why an error is always reported in the lower left corner of the webpage. However, if two lines of code are removed, the test prompt box will pop up normally.
Where is my code wrong? I am very grateful.
Reply to discussion (solution)
The input ID and JS function send () are repeated.
Function doSend ()
{
Alert ("test ");
...
}
Thank you ~! I have been struggling for a long time...
So, how can I score?
Change the send function name in js.
Thank you for your help ~