ソース掲示板




すべてから検索

キーワード   条件 表示 現行ログ 過去ログ トピックス 名前 本文

  メンテナンス 前画面に戻る

対象スレッド 件名: HTML 画面定義テンプレート
名前: lightbox
処理選択
パスワード

件名 HTML 画面定義テンプレート
名前 lightbox
コメント
[[テキストエリア POST 送信]]

https://lightbox.sakura.ne.jp/toolbox/media-page.php?src=html_001(オンライン実行)

@DIV
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta content="width=device-width initial-scale=1.0 minimum-scale=1.0 maximum-scale=1.0 user-scalable=no" name="viewport">
<title></title>
<style>
* {
	font-size: 16px;
	font-family: "ヒラギノ角ゴPro W6","Hiragino Kaku Gothic Pro W6","メイリオ",Meiryo,"MS Pゴシック",Verdana,Arial,Helvetica,sans-serif;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(function(){

});

function checkForm() {
	if ( !confirm( "送信しますか?" ) ) {
		return false;
	}

	if ( $("textarea[name='text']").val().trim() == "" ) {
		alert("必須入力です")
		$("textarea[name='text']").focus();
		return false;
	}

	return true;
}
</script>
</head>
<body>

<form method="post" target="_self" onsubmit="return checkForm();">
	<textarea name="text" style="width:400px;height:100px;"></textarea>
	<br>

	<input type="submit" name="send" value="送信">
</form>

</body>
</html>
@END

@X:s447_1(html)(utf8)