1// JavaScript Document 2$(document).ready(function(){ 3 4 //form reset 5 $('.submit-reset').click(function(){ 6 $('#contact')[0].reset(); 7 }) 8 9 //form back 10 $('.submit-back').click(function(){ 11 window.history.go(-1); 12 }) 13 14 15 my_hissu = $("tr.input_hissu"); 16 17 //å¿ é inputã«function focusin focusoutãä»ããã 18 my_hissu.find("input").focus(_eventFocusin_input); 19 my_hissu.find("textarea").focus(_eventFocusin_textarea); 20 my_hissu.find("label").click(_eventFocusin_input_label); //checkbpx radio ã®å ´åã¯inputãã確èªã§ããªãããlabelããç¢ºèª 21 22 my_hissu.find("input").focusout(_eventFocusout_input); 23 24 //Text_area 25 my_hissu.find("textarea").focusout(_eventFocusout_input_Textarea); 26 27/****************************************************************************/ 28//<!-- Submit Contact--> 29$('.submit-regist').click(function() { 30 check_all_hissu($("tr.input_hissu")); 31 if(all_hissu) { 32 /* OK */ 33 /*alert("OK and goto confirm");*/ 34 $('form#contact').submit(); 35 } else { 36 return false; 37 } 38}); 39$('#contact_form.confirm .submit-regist').click(function() { 40 /*alert("OK and goto finish");*/ 41}); 42 43/****************************************************************************/ 44 45 46}); 47 48 49function _eventFocusin_input(event) { 50 Focusin_input_text($(this)); 51} 52function Focusin_input_text(my_input){ 53 console.log('focusin_input_text: '+my_input.prop('id').replace(/"[0-9]+$"/g, "")); 54 my_input.css("background-color","#fff"); //èæ¯ã¯ç½ããã 55 my_input.parent().find(".alert").slideUp();//alertãé表示ãã 56} 57 58function _eventFocusin_textarea(event) { 59 Focusin_input_textarea($(this)); 60} 61function Focusin_input_textarea(my_input){ 62 console.log('focusin_input_text: '+my_input.prop('id').replace(/"[0-9]+$"/g, "")); 63 my_input.css("background-color","#fff"); //èæ¯ã¯ç½ããã 64 my_input.parent().find(".alert").slideUp();//alertãé表示ãã 65} 66function _eventFocusin_input_label(){ 67 $(this).css("background-color","#fff"); //èæ¯ã¯ç½ããã 68 $(this).parent().find("label").css("background-color","#fff"); 69 $(this).parent().find(".alert").slideUp();//alertãé表示ãã 70} 71 72 73//å¿ é ã¯å ¨é¨å ¥åããã°ãall_hissuã㯠trueã«ããã 74function check_all_hissu(input_hissu_check){ 75 //æåã«all_hissuã¯trueã«ãã 76 all_hissu=true; 77 78 //inputã®ç¨®é¡æ¯ãåã 79 input_hissu_check.each(function(){ 80 switch ($(this).find("input").prop('type')){ 81 case "email": //email ã®å ´å 82 Check_Input_Mail($(this)); 83 break; 84 case "text": //textbox ã®å ´å 85 Check_Input_Text($(this)); 86 break; 87 } 88 89 }); 90 91 //Text_area 92 input_hissu_check.find("textarea").each(function(){ 93 //alert($(this).prop('id')); 94 Check_Textarea($(this)); 95 }); 96} 97 98//TEXT inputãcheck 99function Check_Input_Text(my_this){ 100 //ä½ãæ¸ããªãã£ãå ´å 101 102 if(!my_this.find("input").val()){ 103 //èæ¯è²ä»ãããalertã表示ãããæ¬¡ã®Stepãéããªãã 104 my_this.find("input").css("background-color","#d2fffe");//èæ¯è²ä»ãã 105 my_this.find(".alert").slideDown(); //alertã表示ããã 106 all_hissu=false; 107 } 108 else{ 109 my_this.find("input").css("background-color","#fff"); 110 my_this.find(".alert").slideUp(); 111 } 112} 113//Mail inputãcheck 114function Check_Input_Mail(my_this){ 115 //ä½ãæ¸ããªãã£ãå ´å 116 if(!my_this.find("input").val()){ 117 //èæ¯è²ä»ãããalertã表示ãããæ¬¡ã®Stepãéããªãã 118 my_this.find("input").css("background-color","#d2fffe");//èæ¯è²ä»ãã 119 my_this.find("#alert-mail.alert").slideDown(); //alertã表示ããã 120 all_hissu=false; 121 } 122 else{ 123 my_this.find("#alert-mail.alert").slideUp(); 124 if(!my_this.find("input").val().match(/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/)){ 125 //å®è¡å 容 126 my_this.find("input").css("background-color","#d2fffe");//èæ¯è²ä»ãã 127 my_this.find("#alert-mail_.alert").slideDown(); //alertã表示ããã 128 all_hissu=false; 129 130 } 131 else{ 132 my_this.find("input").css("background-color","#fff"); 133 my_this.find("#alert-mail_.alert").slideUp(); 134 } 135 } 136} 137 138 139//RADIO inputãcheck 140function Check_Input_Radio(my_this,radio_name){ 141 142 //alert($("input[name='data[Candidate][present_status]']:checked").val()); 143 //checkãã¦ããªãã£ãå ´å 144 if(!$("input[name='"+radio_name+"']:checked").val()){ 145 //èæ¯è²ä»ãããalertã表示ãããæ¬¡ã®Stepãéããªãã 146 my_this.parent().find("label").css("background-color","#d2fffe");//èæ¯è²ä»ãã 147 my_this.parent().find(".alert").slideDown(); //alertã表示ããã 148 all_hissu=false; 149 } 150} 151 152//TEXT inputãcheck 153function Check_Textarea(my_this){ 154 //ä½ãæ¸ããªãã£ãå ´å 155 if(!my_this.val()){ 156 //èæ¯è²ä»ãããalertã表示ãããæ¬¡ã®Stepãéããªãã 157 my_this.css("background-color","#d2fffe");//èæ¯è²ä»ãã 158 my_this.parent().find(".alert").slideDown(); //alertã表示ããã 159 all_hissu=false; 160 } 161 else{ 162 my_this.css("background-color","#fff"); 163 my_this.parent().find(".alert").slideUp(); 164 } 165} 166 167 168//inputããFocuså¤ããã 169function _eventFocusout_input(event) { 170 //inputã®ç¨®é¡ãç¢ºèª 171 switch ($(this).prop('type')){ 172 case "text": //textbox ã®å ´å 173 Focusout_input_Text($(this));ã 174 break; 175 case "email": //email ã®å ´å 176 Check_Output_Mail($(this)); 177 break; 178 case "checkbox":ã//checkboxã®å ´å 179 //checkboxã®å ´åä½ãããªãã 180 break; 181 case "radio":ã//checkboxã®å ´å 182 Focusout_input_Radio($(this),$(this).prop('name')); 183 break; 184 } 185 186} 187//inputããFocuså¤ããã 188function _eventFocusout_input_Textarea(event) { 189 Check_Textarea($(this)); 190} 191 192//TEXT inputããFocuså¤ããã 193function Focusout_input_Text(my_this){ 194 //è¤æ°ã®inputãã©ããã調ã¹ã¦ãåããã 195 //ï¼çå¹´ææ¥ã®å ´åãã©ããï¼ 196 if(("birth_year"==my_this.prop('name'))||("birth_month"==my_this.prop('name'))||("birth_day"==my_this.prop('name'))){ 197 //alert("birth :"+my_this.prop('name')); 198 //ä½ãæ¸ããªãå ´å 199 if(!my_this.val()){ 200 //ä½ãåå¿ãã¦ããªã 201 } 202 //ä½ãæ¸ããå ´å 203 else{ 204 //ãã®inputã®èæ¯ã¯ãããããã 205 my_this.css("background-color","#fff"); 206 //å ¨é¨ã®çå¹´ææ¥ãæ¸ãããã©ãã確èªãã¦ãå ¨é¨æ¸ããå ´åã¯alertãé表示 207 if(($("input#birth_year").val())&&($("input#birth_month").val())&&($("input#birth_day").val())){ 208 my_this.parent().parent().parent().find(".alert").slideUp();//alertãé表示 209 } 210 } 211 } 212 //ãæ°åãã®å ´åã¯ãããªã¬ããã¨é£æºããã®ã§ãæ°åå ¥åããã¨ãããªã¬ããã®æ¹ãåå¿
213 else if(my_this.prop('name')=="name"){ 214 //ä½ãæ¸ããªãå ´åãalertã表示ããã 215 if(!my_this.val()){ 216 my_this.css("background-color","#d2fffe");//èæ¯è²ä»ãã 217 my_this.parent().parent().parent().find(".alert").slideDown(); //alertã表示ãã 218 } 219 //ä½ãæ¸ããå ´å 220 else{ 221 //æ°åå ¥åããã¨ãããªã¬ããã®æ¹ãåå¿ 222 if($("input#kana").val()){ 223 $("input#kana").css("background-color","#fff");//èæ¯ã¯ç½ããã 224 $("input#kana").parent().parent().find(".alert").slideUp();//alertãé表示 225 } 226 } 227 } 228 //æ®éã®inputã®å ´åã 229 else{ 230 //ä½ãæ¸ããªãå ´åãalertã表示ãã 231 if(!my_this.val()){ 232 my_this.css("background-color","#d2fffe");//èæ¯è²ä»ãã 233 my_this.parent().parent().parent().find(".alert").slideDown();//alertã表示ãã 234 } 235 } 236} 237 238//Mail inputãcheck 239function Check_Output_Mail(my_this){ 240 //ä½ãæ¸ããªãã£ãå ´å 241 242 if(!my_this.val()){ 243 //èæ¯è²ä»ãããalertã表示ãããæ¬¡ã®Stepãéããªãã 244 my_this.css("background-color","#d2fffe");//èæ¯è²ä»ãã 245 my_this.parent().parent().find("#alert-mail.alert").slideDown(); //alertã表示ããã 246 all_hissu=false; 247 } 248 else{ 249 my_this.parent().parent().find("#alert-mail.alert").slideUp(); 250 if(!my_this.val().match(/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/)){ 251 //å®è¡å 容 252 my_this.css("background-color","#d2fffe");//èæ¯è²ä»ãã 253 my_this.parent().parent().find("#alert-mail_.alert").slideDown(); //alertã表示ããã 254 all_hissu=false; 255 256 } 257 else{ 258 my_this.css("background-color","#fff"); 259 my_this.parent().parent().find("#alert-mail_.alert").slideUp(); 260 } 261 } 262}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.