An error occurred while calling onclick in form.

Source: Internet
Author: User
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 ~

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.