Last active
December 1, 2017 04:38
-
-
Save mgng/cf9abb38d19a8af731e43affc3851c3d to your computer and use it in GitHub Desktop.
LINE URLスキームを使ってメッセージ送信
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p> | |
<input type="text" name="text" id="id_text_20171201" value="" placeholder="message" /> | |
<button onclick="send2line();">LINEに送る</button> | |
</p> | |
<script> | |
function send2line(){ | |
var text = document.getElementById("id_text_20171201").value; | |
if (text === "") { | |
alert("テキストが未入力です。"); | |
} else { | |
location.href="line://msg/text/?" + encodeURIComponent(text); | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment