简体   繁体   中英

Sending a mail with Javascript in HTML page

I design a contact form using html & upload it my server under my domain name. Now I want to get mail from site user. my contact form design here

There are a few ways you can go about this, you can firstly use aJax with a POST to the database (jQuery) or you can interact with a controller by posting to the controller and then handling the sql queries within the controller.

You cannot use javascript on it's own to send mail, it's clientside code.. You can code a controller which will send mail when you post your details captured from your contact form.

Please post your attempts so I can assist you further.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM