Automatically submit a question after adding a button in the submit table

Source: Internet
Author: User
After a button is added to the submit table, the system automatically submits the problem. I want to add a button to the table. when a button is pressed, the system only needs to obtain the position and enter it. do not submit the button. However, after I put the button in the table, the table will be automatically submitted after the button is pressed. What should I do before I press the button and do not submit it?

 


This is to call the jssdk location interface to obtain the location.
Wx. ready (function () {document. querySelector ('# getlocation '). onclick = function () {wx. getLocation ({type: 'gcj02', success: function (res) {// alert (JSON. stringify (res); var lat = res. latitude; var lng = res. longpolling; var latLng = new qq. maps. latLng (lat, lng); geocoder = new qq. maps. geocoder ({complete: function (result) {signin_info = result. detail. addressComponents. province + result. detail. addressComponents. city + result. detail. addressComponents. district + result. detail. addressComponents. street; $ ("# address "). val (signin_info) ;}}) geocoder. getAddress (latLng) ;}, cancel: function (res) {alert ('User denied authorization to obtain geographic location ');}});};


Reply to discussion (solution)

Click where I won't submit

Click where I won't submit



I write it like this, click where I am, and then the whole table is submitted. Will it be related to the if (IS_POST) written in the background?
When I click where I am, I just want to run the following js code.

Did you click it wrong?
I won't submit it when I click where.
Or are you?
Click submit?

Did you click it wrong?
I won't submit it when I click where.
Or are you?
Click submit?



After I click it, I will get the address and submit it. Will it be related to the if (IS_POST) written in the background?

Where am I?


Click this button. Key points are submitted.

Button comes with type = "submit", so it will be submitted
Adding a type = "button" won't be submitted.
Or directly change it

If you set the type to button, it will not be submitted.

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.