//jquery document.write(''); //jquery-ui document.write(''); document.write(''); document.write(''); //datetimepicker //document.write(''); //document.write(''); //document.write(''); //exFixed document.write(''); //ceebox document.write(''); document.write(''); //elFinder document.write(''); document.write(''); document.write(''); //TinyMCE document.write(''); window.onload = function () { //移動 linkTo = function (url) { location.href = url; } //フォーム送信 submitForm = function (obj) { if (checkInput()) { obj.submit(); } } //入力チェック checkInput = function () { var check = true; //未入力チェック $(':input[required]:enabled').each(function () { //テキスト if ($(this).is(':text,textarea')) { //未入力チェック if ($(this).val() == '') { check = false; msg = $(this).attr('item_label')+' を入力してください。'; } } //ラジオ、チェックボックス else if ($(this).is(':radio,:checkbox')) { if ($(':input[name="'+$(this).attr('name')+'"]:checked').size() == 0) { check = false; msg = $(this).attr('item_label')+' を選択してください。'; } } if (check === false) { alert(msg); $(this).focus(); return false; } }); if (check === false) { return check; } //文字種チェック $(':input[validate]').each(function () { switch ($(this).attr('validate')) { case 'alpha': var exp = '[!^a-zA-Z]'; var exp_msg = $(this).attr('item_label')+' は 半角アルファベット で入力してください。'; break; case 'alpha_numeric': var exp = '[!^a-zA-Z0-9]'; var exp_msg = $(this).attr('item_label')+' は 半角英数字 で入力してください。'; break; case 'alpha_dash': var exp = '[!^a-zA-Z0-9\-_]'; var exp_msg = $(this).attr('item_label')+' は 半角英数字、アンダースコア、ハイフン で入力してください。'; break; case 'numeric': var exp = '[!^0-9]'; var exp_msg = $(this).attr('item_label')+' は 半角数字 で入力してください。'; break; case 'email': var exp = '[!#-9A-~]+@+[a-z0-9]+.+[^.]$'; var exp_msg = $(this).attr('item_label')+' の形式が正しくありません。'; break; } var RegularExp = new RegExp(exp); if ($(this).val() != '' && !$(this).val().match(RegularExp)) { check = false; msg = exp_msg; } if (check === false) { alert(msg); $(this).focus(); return false; } }); return check; } };