Skip to content

Instantly share code, notes, and snippets.

@mgng
Last active December 1, 2017 04:38
LINE URLスキームを使ってメッセージ送信
<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