Skip to content

Instantly share code, notes, and snippets.

@yotubarail
Last active December 27, 2019 02:22
Show Gist options
  • Save yotubarail/5ead9e1cf36d4fe7d4df08a47f36da3c to your computer and use it in GitHub Desktop.
Save yotubarail/5ead9e1cf36d4fe7d4df08a47f36da3c to your computer and use it in GitHub Desktop.
受付のJS
function slack() {
let xmlhttp = new XMLHttpRequest();
let webhook_url = 'https://hooks.slack.com/services/******/******';
let message = '{"username": "受付" ,"text":"受付でボタンが押されました", "icon_emoji": ":office:"}';
xmlhttp.open('POST', webhook_url, false);
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlhttp.send(message);
location.href='reception2.html';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment