Skip to content

Instantly share code, notes, and snippets.

@blackstuend
Last active December 18, 2018 04:00
Show Gist options
  • Save blackstuend/4f5139e3762565f2a3c0935648fdebfe to your computer and use it in GitHub Desktop.
Save blackstuend/4f5139e3762565f2a3c0935648fdebfe to your computer and use it in GitHub Desktop.

Form

  • Form submit return false fail if use async
<!DOCTYPE html>
<html>
<head>
    <meta charset='UTF-8'>
</head>
<body>
    <form action='/user' method ='get' id='form'>
        <input width='10px'>
        <button type=submit>傳送</button>
    </form>
    <script>
        var form = document.querySelector('form')
        window.onload=async function(){  
            form.onsubmit=function(){
                return false
            }
        }
    </script>
</body>
</html>
  • How to install SSL on nginx server use carbot or let's encrypt?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment