<script>
function sendWebhook() {
var http = new XMLHttpRequest();
var url = 'here is the link of the webhook';
var content = {
"content": " the form data will go here "
};
http.open('POST', url, true);
http.setRequestHeader('Content-type', 'application/json');
http.onreadystatechange = function() {
if(http.readyState == 4 && http.status == 200) {
alert(http.responseText);
}
}
http.send(JSON.stringify(content));
}
</script>
<input id="plswork" type="text" value="clickeame" onclick="webhookdata()" />
<input id="contact-submit" type="button" class="btn btn-transparent" value="clickeame" onclick="sendWebhook()" />
这是我的代码,我希望