How to use insertAfter method in wpt

Best JavaScript code snippet using wpt

vacc.js

Source:vacc.js Github

copy

Full Screen

...9 }10 function chageSelect() {11 var selectList = document.getElementById("region")12 if (selectList.options[selectList.selectedIndex].value == "서울특별시") {13 $("<option value='종로구' class='seoul'>종로구</option>").insertAfter("#zone");14 $("<option value='중구' class='seoul'>중구</option>").insertAfter("#zone");15 $("<option value='용산구' class='seoul'>용산구</option>").insertAfter("#zone");16 $("<option value='성동구' class='seoul'>성동구</option>").insertAfter("#zone");17 $("<option value='광진구' class='seoul'>광진구</option>").insertAfter("#zone");18 $("<option value='동대문구' class='seoul'>동대문구</option>").insertAfter("#zone");19 $("<option value='중랑구' class='seoul'>중랑구</option>").insertAfter("#zone");20 $("<option value='성북구' class='seoul'>성북구</option>").insertAfter("#zone");21 $("<option value='강북구' class='seoul'>강북구</option>").insertAfter("#zone");22 $("<option value='도봉구' class='seoul'>도봉구</option>").insertAfter("#zone");23 $("<option value='노원구' class='seoul'>노원구</option>").insertAfter("#zone");24 $("<option value='은평구' class='seoul'>은평구</option>").insertAfter("#zone");25 $("<option value='서대문구'class='seoul'>서대문구</option>").insertAfter("#zone");26 $("<option value='강서구' class='seoul'>강서구</option>").insertAfter("#zone");27 $("<option value='구로구' class='seoul'>구로구</option>").insertAfter("#zone");28 $("<option value='영등포구' class='seoul'>영등포구</option>").insertAfter("#zone");29 $("<option value='금천구' class='seoul'>금천구</option>").insertAfter("#zone");30 $("<option value='동작구' class='seoul'>동작구</option>").insertAfter("#zone");31 $("<option value='관악구' class='seoul'>관악구</option>").insertAfter("#zone");32 $("<option value='서초구' class='seoul'>서초구</option>").insertAfter("#zone");33 $("<option value='강남구' class='seoul'>강남구</option>").insertAfter("#zone");34 $("<option value='송파구' class='seoul'>송파구</option>").insertAfter("#zone");35 $("<option value='강동구' class='seoul'>강동구</option>").insertAfter("#zone");36 }37 else{ 38 $(".seoul").remove();39 }40 if (selectList.options[selectList.selectedIndex].value == "부산광역시") {41 $("<option value='중구' class='busan'>중구</option>").insertAfter("#zone");42 $("<option value='서구' class='busan'>서구</option>").insertAfter("#zone");43 $("<option value='동구' class='busan'>동구</option>").insertAfter("#zone");44 $("<option value='영도구' class='busan'>영도구</option>").insertAfter("#zone");45 $("<option value='부산진구' class='busan'>부산진구</option>").insertAfter("#zone");46 $("<option value='동래구' class='busan'>동래구</option>").insertAfter("#zone");47 $("<option value='남구' class='busan'>남구</option>").insertAfter("#zone");48 $("<option value='북구' class='busan'>북구</option>").insertAfter("#zone");49 $("<option value='강서구' class='busan'>강서구</option>").insertAfter("#zone");50 $("<option value='해운대구' class='busan'>해운대구</option>").insertAfter("#zone");51 $("<option value='사하구' class='busan'>사하구</option>").insertAfter("#zone");52 $("<option value='금정구' class='busan'>금정구</option>").insertAfter("#zone");53 $("<option value='연제구' class='busan'>연제구</option>").insertAfter("#zone");54 $("<option value='수영구' class='busan'>수영구</option>").insertAfter("#zone");55 $("<option value='사상구' class='busan'>사상구</option>").insertAfter("#zone");56 }57 else{58 $(".busan").remove();59 }60 if (selectList.options[selectList.selectedIndex].value == "대구광역시") {61 $("<option value='중구' class='daegu'>중구</option>").insertAfter("#zone");62 $("<option value='동구' class='daegu'>동구</option>").insertAfter("#zone");63 $("<option value='서구' class='daegu'>서구</option>").insertAfter("#zone");64 $("<option value='남구' class='daegu'>남구</option>").insertAfter("#zone");65 $("<option value='북구' class='daegu'>북구</option>").insertAfter("#zone");66 $("<option value='수성구' class='daegu'>수성구</option>").insertAfter("#zone");67 $("<option value='달서구' class='daegu'>달서구</option>").insertAfter("#zone");68 $("<option value='달성군' class='daegu'>달성군</option>").insertAfter("#zone");69 }70 else{71 $(".daegu").remove();72 }73 if (selectList.options[selectList.selectedIndex].value == "인천광역시") {74 $("<option value='중구' class='inchan'>중구</option>").insertAfter("#zone");75 $("<option value='동구' class='inchan'>동구</option>").insertAfter("#zone");76 $("<option value='미추홀구' class='inchan'>미추홀구</option>").insertAfter("#zone");77 $("<option value='연수구' class='inchan'>연수구</option>").insertAfter("#zone");78 $("<option value='남동구' class='inchan'>남동구</option>").insertAfter("#zone");79 $("<option value='부평구' class='inchan'>부평구</option>").insertAfter("#zone");80 $("<option value='계양구' class='inchan'>계양구</option>").insertAfter("#zone");81 $("<option value='서구' class='inchan'>서구</option>").insertAfter("#zone");82 $("<option value='강화군' class='inchan'>강화군</option>").insertAfter("#zone");83 $("<option value='웅진군' class='inchan'>웅진군</option>").insertAfter("#zone");84 }else{85 $(".inchan").remove();86 }87 if (selectList.options[selectList.selectedIndex].value == "광주광역시") {88 $("<option value='동구' class='gwangju'>동구</option>").insertAfter("#zone");89 $("<option value='서구' class='gwangju'>서구</option>").insertAfter("#zone");90 $("<option value='남구' class='gwangju'>남구</option>").insertAfter("#zone");91 $("<option value='북구' class='gwangju'>북구</option>").insertAfter("#zone");92 $("<option value='광산구' class='gwangju'>광산구</option>").insertAfter("#zone");93 }else{94 $(".gwangju").remove();95 }96 if (selectList.options[selectList.selectedIndex].value == "대전광역시") {97 $("<option value='동구' class='daejeon'>동구</option>").insertAfter("#zone");98 $("<option value='중구' class='daejeon'>중구</option>").insertAfter("#zone");99 $("<option value='서구' class='daejeon'>서구</option>").insertAfter("#zone");100 $("<option value='유성구' class='daejeon'>유성구</option>").insertAfter("#zone");101 $("<option value='대덕구' class='daejeon'>대덕구</option>").insertAfter("#zone");102 }else{103 $(".daejeon").remove();104 }105 if (selectList.options[selectList.selectedIndex].value == "울산광역시") {106 $("<option value='남구' class='ulsan'>남구</option>").insertAfter("#zone");107 $("<option value='중구' class='ulsan'>중구</option>").insertAfter("#zone");108 $("<option value='북구' class='ulsan'>북구</option>").insertAfter("#zone");109 $("<option value='동구' class='ulsan'>동구</option>").insertAfter("#zone");110 $("<option value='울주군' class='ulsan'>울주군</option>").insertAfter("#zone");111 }else{112 $(".ulsan").remove();113 }114 if (selectList.options[selectList.selectedIndex].value == "경기도") {115 $("<option value='수원시 장안구' class='gyeonggido'>수원시 장안구</option>").insertAfter("#zone");116 $("<option value='수원시 권선구' class='gyeonggido'>수원시 권선구</option>").insertAfter("#zone");117 $("<option value='수원시 팔달구' class='gyeonggido'>수원시 팔달구</option>").insertAfter("#zone");118 $("<option value='수원시 영통구' class='gyeonggido'>수원시 영통구</option>").insertAfter("#zone");119 $("<option value='성남시 수정구' class='gyeonggido'>성남시 수정구</option>").insertAfter("#zone");120 $("<option value='성남시 중원구' class='gyeonggido'>성남시 중원구</option>").insertAfter("#zone");121 $("<option value='성남시 분당구' class='gyeonggido'>성남시 분당구</option>").insertAfter("#zone");122 $("<option value='안양시 만안구' class='gyeonggido'>안양시 만안구</option>").insertAfter("#zone");123 $("<option value='안양시 동안구' class='gyeonggido'>안양시 동안구</option>").insertAfter("#zone");124 $("<option value='용인시 처인구' class='gyeonggido'>용인시 처인구</option>").insertAfter("#zone");125 $("<option value='용인시 기흥구' class='gyeonggido'>용인시 기흥구</option>").insertAfter("#zone");126 $("<option value='용인시 수지구' class='gyeonggido'>용인시 수지구</option>").insertAfter("#zone");127 $("<option value='부천시' class='gyeonggido'>부천시</option>").insertAfter("#zone");128 $("<option value='광명시' class='gyeonggido'>광명시</option>").insertAfter("#zone");129 $("<option value='평택시' class='gyeonggido'>평택시</option>").insertAfter("#zone");130 $("<option value='과천시' class='gyeonggido'>과천시</option>").insertAfter("#zone");131 $("<option value='오산시' class='gyeonggido'>오산시</option>").insertAfter("#zone");132 $("<option value='시흥시' class='gyeonggido'>시흥시</option>").insertAfter("#zone");133 $("<option value='군포시' class='gyeonggido'>군포시</option>").insertAfter("#zone");134 $("<option value='의왕시' class='gyeonggido'>의왕시</option>").insertAfter("#zone");135 $("<option value='하남시' class='gyeonggido'>하남시</option>").insertAfter("#zone");136 $("<option value='이천시' class='gyeonggido'>이천시</option>").insertAfter("#zone");137 $("<option value='안성시' class='gyeonggido'>안성시</option>").insertAfter("#zone");138 $("<option value='김포시' class='gyeonggido'>김포시</option>").insertAfter("#zone");139 $("<option value='화성시' class='gyeonggido'>화성시</option>").insertAfter("#zone");140 $("<option value='광주시' class='gyeonggido'>광주시</option>").insertAfter("#zone");141 $("<option value='여주시' class='gyeonggido'>여주시</option>").insertAfter("#zone"); 142 $("<option value='양평군' class='gyeonggido'>양평군</option>").insertAfter("#zone"); 143 $("<option value='고양시 덕양구' class='gyeonggido'>고양시 덕양구</option>").insertAfter("#zone"); 144 $("<option value='고양시 일산동구' class='gyeonggido'>고양시 일산동구</option>").insertAfter("#zone"); 145 $("<option value='고양시 일산서구' class='gyeonggido'>고양시 일산서구</option>").insertAfter("#zone"); 146 $("<option value='의정부시' class='gyeonggido'>의정부시</option>").insertAfter("#zone"); 147 $("<option value='동두천시' class='gyeonggido'>동두천시</option>").insertAfter("#zone"); 148 $("<option value='구리시' class='gyeonggido'>구리시</option>").insertAfter("#zone"); 149 $("<option value='남양주시' class='gyeonggido'>남양주시</option>").insertAfter("#zone"); 150 $("<option value='파주시' class='gyeonggido'>파주시</option>").insertAfter("#zone"); 151 $("<option value='양주시' class='gyeonggido'>양주시</option>").insertAfter("#zone"); 152 $("<option value='포천시' class='gyeonggido'>포천시</option>").insertAfter("#zone"); 153 $("<option value='연천군' class='gyeonggido'>연천군</option>").insertAfter("#zone"); 154 $("<option value='가평군' class='gyeonggido'>가평군</option>").insertAfter("#zone"); 155 }else{156 $(".gyeonggido").remove();157 }158 if (selectList.options[selectList.selectedIndex].value == "강원도") {159 $("<option value='양양군' class='gangwondo'>양양군</option>").insertAfter("#zone");160 $("<option value='고성군' class='gangwondo'>고성군</option>").insertAfter("#zone");161 $("<option value='인제군' class='gangwondo'>인제군</option>").insertAfter("#zone");162 $("<option value='양구군' class='gangwondo'>양구군</option>").insertAfter("#zone");163 $("<option value='화천군' class='gangwondo'>화천군</option>").insertAfter("#zone");164 $("<option value='철원군' class='gangwondo'>철원군</option>").insertAfter("#zone");165 $("<option value='정선군' class='gangwondo'>정선군</option>").insertAfter("#zone");166 $("<option value='평창군' class='gangwondo'>평창군</option>").insertAfter("#zone");167 $("<option value='영월군' class='gangwondo'>영월군</option>").insertAfter("#zone");168 $("<option value='횡성군' class='gangwondo'>횡성군</option>").insertAfter("#zone");169 $("<option value='홍천구' class='gangwondo'>홍천구</option>").insertAfter("#zone");170 $("<option value='삼척시' class='gangwondo'>삼척시</option>").insertAfter("#zone");171 $("<option value='속초시' class='gangwondo'>속초시</option>").insertAfter("#zone");172 $("<option value='태백시' class='gangwondo'>태백시</option>").insertAfter("#zone");173 $("<option value='동해시' class='gangwondo'>동해시</option>").insertAfter("#zone");174 $("<option value='강릉시' class='gangwondo'>강릉시</option>").insertAfter("#zone");175 $("<option value='원주시' class='gangwondo'>원주시</option>").insertAfter("#zone");176 $("<option value='춘천시' class='gangwondo'>춘천시</option>").insertAfter("#zone");177 }else{178 $(".gangwondo").remove();179 }180 if (selectList.options[selectList.selectedIndex].value == "충청북도") {181 $("<option value='단양군' class='cbukdo'>단양군</option>").insertAfter("#zone");182 $("<option value='음성군' class='cbukdo'>음성군</option>").insertAfter("#zone");183 $("<option value='괴산군' class='cbukdo'>괴산군</option>").insertAfter("#zone");184 $("<option value='진천군' class='cbukdo'>진천군</option>").insertAfter("#zone");185 $("<option value='증평군' class='cbukdo'>증평군</option>").insertAfter("#zone");186 $("<option value='영동군' class='cbukdo'>영동군</option>").insertAfter("#zone");187 $("<option value='옥천구' class='cbukdo'>옥천구</option>").insertAfter("#zone");188 $("<option value='보은군' class='cbukdo'>보은군</option>").insertAfter("#zone");189 $("<option value='제천시' class='cbukdo'>제천시</option>").insertAfter("#zone");190 $("<option value='충주시' class='cbukdo'>충주시</option>").insertAfter("#zone");191 $("<option value='청주시 청원구' class='cbukdo'>청주시 청원구</option>").insertAfter("#zone");192 $("<option value='청주시 서원구' class='cbukdo'>청주시 서원구</option>").insertAfter("#zone");193 $("<option value='청주시 흥덕구' class='cbukdo'>청주시 흥덕구</option>").insertAfter("#zone");194 $("<option value='청주시 상당구' class='cbukdo'>청주시 상당구</option>").insertAfter("#zone");195 }else{196 $(".cbukdo").remove();197 }198 if (selectList.options[selectList.selectedIndex].value == "충청남도") {199 $("<option value='태안군' class='cnamdo'>태안군</option>").insertAfter("#zone");200 $("<option value='예산군' class='cnamdo'>예산군</option>").insertAfter("#zone");201 $("<option value='홍성군' class='cnamdo'>홍성군</option>").insertAfter("#zone");202 $("<option value='청양군' class='cnamdo'>청양군</option>").insertAfter("#zone");203 $("<option value='서천군' class='cnamdo'>서천군</option>").insertAfter("#zone");204 $("<option value='부여군' class='cnamdo'>부여군</option>").insertAfter("#zone");205 $("<option value='금산군' class='cnamdo'>금산군</option>").insertAfter("#zone");206 $("<option value='당진시' class='cnamdo'>당진시</option>").insertAfter("#zone");207 $("<option value='계룡시' class='cnamdo'>계룡시</option>").insertAfter("#zone");208 $("<option value='논산시' class='cnamdo'>논산시</option>").insertAfter("#zone");209 $("<option value='서산시' class='cnamdo'>서산시</option>").insertAfter("#zone");210 $("<option value='아산시' class='cnamdo'>아산시</option>").insertAfter("#zone");211 $("<option value='보령시' class='cnamdo'>보령시</option>").insertAfter("#zone");212 $("<option value='공주시' class='cnamdo'>공주시</option>").insertAfter("#zone");213 $("<option value='천안시 동남구' class='cnamdo'>천안시 동남구</option>").insertAfter("#zone");214 $("<option value='천안시 서북구' class='cnamdo'>천안시 서북구</option>").insertAfter("#zone");215 }else{216 $(".cnamdo").remove();217 }if (selectList.options[selectList.selectedIndex].value == "전라북도") {218 $("<option value='부안군' class='jbukdo'>부안군</option>").insertAfter("#zone");219 $("<option value='고창군' class='jbukdo'>고창군</option>").insertAfter("#zone");220 $("<option value='순창군' class='jbukdo'>순창군</option>").insertAfter("#zone");221 $("<option value='임실군' class='jbukdo'>임실군</option>").insertAfter("#zone");222 $("<option value='장수군' class='jbukdo'>장수군</option>").insertAfter("#zone");223 $("<option value='무주군' class='jbukdo'>무주군</option>").insertAfter("#zone");224 $("<option value='진안군' class='jbukdo'>진안군</option>").insertAfter("#zone");225 $("<option value='완주군' class='jbukdo'>완주군</option>").insertAfter("#zone");226 $("<option value='김제시' class='jbukdo'>김제시</option>").insertAfter("#zone");227 $("<option value='남원시' class='jbukdo'>남원시</option>").insertAfter("#zone");228 $("<option value='정읍시' class='jbukdo'>정읍시</option>").insertAfter("#zone");229 $("<option value='익산시' class='jbukdo'>익산시</option>").insertAfter("#zone");230 $("<option value='군산시' class='jbukdo'>군산시</option>").insertAfter("#zone");231 $("<option value='전주시 덕진구' class='jbukdo'>전주시 덕진구</option>").insertAfter("#zone");232 $("<option value='전주시 완산구' class='jbukdo'>전주시 완산구</option>").insertAfter("#zone");233 }else{234 $(".jbukdo").remove();235 }236 if (selectList.options[selectList.selectedIndex].value == "전라남도") {237 $("<option value='신안군' class='jnamdo'>신안군</option>").insertAfter("#zone");238 $("<option value='진도군' class='jnamdo'>진도군</option>").insertAfter("#zone");239 $("<option value='완도군' class='jnamdo'>완도군</option>").insertAfter("#zone");240 $("<option value='장성군' class='jnamdo'>장성군</option>").insertAfter("#zone");241 $("<option value='영광군' class='jnamdo'>영광군</option>").insertAfter("#zone");242 $("<option value='함평군' class='jnamdo'>함평군</option>").insertAfter("#zone");243 $("<option value='무안군' class='jnamdo'>무안군</option>").insertAfter("#zone");244 $("<option value='영암군' class='jnamdo'>영암군</option>").insertAfter("#zone");245 $("<option value='해남군' class='jnamdo'>해남군</option>").insertAfter("#zone");246 $("<option value='강진군' class='jnamdo'>강진군</option>").insertAfter("#zone");247 $("<option value='장흥군' class='jnamdo'>장흥군</option>").insertAfter("#zone");248 $("<option value='화순군' class='jnamdo'>화순군</option>").insertAfter("#zone");249 $("<option value='보성군' class='jnamdo'>보성군</option>").insertAfter("#zone");250 $("<option value='고흥군' class='jnamdo'>고흥군</option>").insertAfter("#zone");251 $("<option value='구례군' class='jnamdo'>구례군</option>").insertAfter("#zone");252 $("<option value='곡성군' class='jnamdo'>곡성군</option>").insertAfter("#zone");253 $("<option value='담양군' class='jnamdo'>담양군</option>").insertAfter("#zone");254 $("<option value='광양시' class='jnamdo'>광양시</option>").insertAfter("#zone");255 $("<option value='나주시' class='jnamdo'>나주시</option>").insertAfter("#zone");256 $("<option value='순천시' class='jnamdo'>순천시</option>").insertAfter("#zone");257 $("<option value='여수시' class='jnamdo'>여수시</option>").insertAfter("#zone");258 $("<option value='목포시' class='jnamdo'>목포시</option>").insertAfter("#zone"); 259 }else{260 $(".jnamdo").remove();261 }262 if (selectList.options[selectList.selectedIndex].value == "경상북도") {263 $("<option value='울릉군' class='gbukdo'>울릉군</option>").insertAfter("#zone");264 $("<option value='울진군' class='gbukdo'>울진군</option>").insertAfter("#zone");265 $("<option value='봉화군' class='gbukdo'>봉화군</option>").insertAfter("#zone");266 $("<option value='예천군' class='gbukdo'>예천군</option>").insertAfter("#zone");267 $("<option value='칠곡군' class='gbukdo'>칠곡군</option>").insertAfter("#zone");268 $("<option value='성주군' class='gbukdo'>성주군</option>").insertAfter("#zone");269 $("<option value='고령군' class='gbukdo'>고령군</option>").insertAfter("#zone");270 $("<option value='청도군' class='gbukdo'>청도군</option>").insertAfter("#zone");271 $("<option value='영덕군' class='gbukdo'>영덕군</option>").insertAfter("#zone");272 $("<option value='영양군' class='gbukdo'>영양군</option>").insertAfter("#zone");273 $("<option value='청송군' class='gbukdo'>청송군</option>").insertAfter("#zone");274 $("<option value='의성군' class='gbukdo'>의성군</option>").insertAfter("#zone");275 $("<option value='군위군' class='gbukdo'>군위군</option>").insertAfter("#zone");276 $("<option value='경산시' class='gbukdo'>경산시</option>").insertAfter("#zone");277 $("<option value='문경시' class='gbukdo'>문경시</option>").insertAfter("#zone");278 $("<option value='상주시' class='gbukdo'>상주시</option>").insertAfter("#zone");279 $("<option value='영천시' class='gbukdo'>영천시</option>").insertAfter("#zone");280 $("<option value='영주시' class='gbukdo'>영주시</option>").insertAfter("#zone");281 $("<option value='구미시' class='gbukdo'>구미시</option>").insertAfter("#zone");282 $("<option value='안동시' class='gbukdo'>안동시</option>").insertAfter("#zone");283 $("<option value='김천시' class='gbukdo'>김천시</option>").insertAfter("#zone");284 $("<option value='경주시' class='gbukdo'>경주시</option>").insertAfter("#zone");285 $("<option value='포항시 북구' class='gbukdo'>포항시 북구</option>").insertAfter("#zone");286 $("<option value='포항시 남구' class='gbukdo'>포항시 남구</option>").insertAfter("#zone");287 }else{288 $(".gbukdo").remove();289 }290 if (selectList.options[selectList.selectedIndex].value == "경상남도") {291 $("<option value='합천군' class='gnamdo'>합천군</option>").insertAfter("#zone");292 $("<option value='거창군' class='gnamdo'>거창군</option>").insertAfter("#zone");293 $("<option value='함양군' class='gnamdo'>함양군</option>").insertAfter("#zone");294 $("<option value='산청군' class='gnamdo'>산청군</option>").insertAfter("#zone");295 $("<option value='하동군' class='gnamdo'>하동군</option>").insertAfter("#zone");296 $("<option value='남해군' class='gnamdo'>남해군</option>").insertAfter("#zone");297 $("<option value='고성군' class='gnamdo'>고성군</option>").insertAfter("#zone");298 $("<option value='창녕군' class='gnamdo'>창녕군</option>").insertAfter("#zone");299 $("<option value='함안군' class='gnamdo'>함안군</option>").insertAfter("#zone");300 $("<option value='의령군' class='gnamdo'>의령군</option>").insertAfter("#zone");301 $("<option value='양산시' class='gnamdo'>양산시</option>").insertAfter("#zone");302 $("<option value='거제시' class='gnamdo'>거제시</option>").insertAfter("#zone");303 $("<option value='밀양시' class='gnamdo'>밀양시</option>").insertAfter("#zone");304 $("<option value='김해시' class='gnamdo'>김해시</option>").insertAfter("#zone");305 $("<option value='사천시' class='gnamdo'>사천시</option>").insertAfter("#zone");306 $("<option value='통영시' class='gnamdo'>통영시</option>").insertAfter("#zone");307 $("<option value='진주시' class='gnamdo'>진주시</option>").insertAfter("#zone");308 $("<option value='창원시 진해구' class='gnamdo'>창원시 진해구</option>").insertAfter("#zone");309 $("<option value='창원시 마산회원구' class='gnamdo'>창원시 마산회원구</option>").insertAfter("#zone");310 $("<option value='창원시 마산합포구' class='gnamdo'>창원시 마산합포구</option>").insertAfter("#zone");311 $("<option value='창원시 성산구' class='gnamdo'>창원시 성산구</option>").insertAfter("#zone");312 $("<option value='창원시 의창구' class='gnamdo'>창원시 의창구</option>").insertAfter("#zone");313 }else{314 $(".gnamdo").remove();315 }316 if (selectList.options[selectList.selectedIndex].value == "제주특별자치도") {317 $("<option value='서귀포시' class='jeju'>서귀포시</option>").insertAfter("#zone");318 $("<option value='제주시' class='jeju'>제주시</option>").insertAfter("#zone");319 }else{320 $(".jeju").remove();321 }...

Full Screen

Full Screen

reg.js

Source:reg.js Github

copy

Full Screen

...11 var _csrf = $('#_csrf').val();12 //注册手机13 $('#mobile').focus(function(){ 14 $('#mobile').nextAll().not('.tel_icon').remove();15 $('<div id="msgmlsUser" class="msg_error"><span></span>'+phoneMessage[0]+'</div>').insertAfter('#mobile');16 });17 $('#mobile').blur(function(){18 $('#mobile').nextAll().not('.tel_icon').remove();19 var val = $(this).val();20 checkPhone(val,_csrf);21 }); 22 //注册用户名23 $('#nickname').focus(function(){24 $('#nickname').nextAll().not('.user_icon').remove();25 $('<div id="msgmlsUser" class="msg_error"><span></span>'+usernameMessage[0]+'</div>').insertAfter('#nickname');26 });27 $('#nickname').blur(function(){28 $('#nickname').nextAll().not('.user_icon').remove();29 var val = $(this).val();30 checkUsername(val,_csrf);31 }); 32 //注册密码验证33 $('#password').focus(function(){34 $('.confpass').fadeIn(0);35 $('#password').nextAll().not('.pwd_icon').remove();36 $('<div id="msgmlsUser" class="msg_error"><span></span>'+passwordMessage[0]+'</div>').insertAfter('#password');37 });38 $('#password').blur(function(){39 40 var val = $(this).val();41 var res = checkPassword(val);42 $('#password').nextAll().not('.pwd_icon').remove(); 43 if (res == 1) { 44 $('<span class="msg_err"></span>').insertAfter('#password');45 $('<div id="msgmlsUser" class="msg_error"><span></span>'+passwordMessage[1]+'</div>').insertAfter('#password');46 }else if(res == 2) {47 $('<span class="msg_err"></span>').insertAfter('#password');48 $('<div id="msgmlsUser" class="msg_error"><span></span>'+passwordMessage[2]+'</div>').insertAfter('#password'); 49 }else if(res == 4){50 $('<div id="msgmlsUser" class="msg_error"><span></span>'+passwordMessage[4]+'</div>').insertAfter('#password'); 51 }else if(res == 5){52 $('<span class="msg_err"></span>').insertAfter('#password');53 $('<div id="msgmlsUser" class="msg_error"><span></span>'+passwordMessage[5]+'</div>').insertAfter('#password'); 54 }else{55 $('<div id="msgmlsUser" class="msg_error"><span></span>'+passwordMessage[6]+'</div>').insertAfter('#password'); 56 // $('.none_f').fadeIn(0);57 passwordlock = true;58 }59 }); 60 //密码确认61 $('#conf_password').focus(function(){62 $('#conf_password').nextAll().not('.pwd_icon').remove();63 $('<div id="msgmlsUser" class="msg_error"><span></span>'+passwordMessage[0]+'</div>').insertAfter('#conf_password');64 });65 $('#conf_password').blur(function(){66 67 var val = $(this).val();68 var res = checkPassword(val);69 $('#conf_password').nextAll().not('.pwd_icon').remove();70 71 if (res == 1) { 72 $('<span class="msg_err"></span>').insertAfter('#conf_password');73 $('<div id="msgmlsUser" class="msg_error"><span></span>'+passwordMessage[7]+'</div>').insertAfter('#conf_password');74 }else if(res == 2){75 $('<span class="msg_err"></span>').insertAfter('#conf_password');76 $('<div id="msgmlsUser" class="msg_error"><span></span>'+passwordMessage[2]+'</div>').insertAfter('#conf_password'); 77 }else if(res == 3){78 $('<span class="msg_err"></span>').insertAfter('#conf_password');79 $('<div id="msgmlsUser" class="msg_error"><span></span>'+passwordMessage[3]+'</div>').insertAfter('#conf_password'); 80 }else if(res == 4){81 $('<span class="msg_err"></span>').insertAfter('#conf_password');82 $('<div id="msgmlsUser" class="msg_error"><span></span>'+passwordMessage[4]+'</div>').insertAfter('#conf_password'); 83 }else if(res == 5){84 $('<span class="msg_err"></span>').insertAfter('#conf_password');85 $('<div id="msgmlsUser" class="msg_error"><span></span>'+passwordMessage[5]+'</div>').insertAfter('#conf_password'); 86 }else{87 $('#password').nextAll().not('.pwd_icon').remove(); 88 confpasslock = true; 89 }90 });91 //验证码验证92 $('#checkcode').focus(function(){93 94 $('#checkcode').nextAll().not('.code_icon').not('.checkImage').remove();95 $('<div id="msgmlsUser" class="msg_error"><span></span>'+captchaMessage[0]+'</div>').insertAfter('#checkcode');96 });97 $('#checkcode').blur(function(){98 $('#checkcode').nextAll().not('.code_icon').not('.checkImage').remove(); 99 var val = $(this).val();100 checkCode(val);101 102 });103 //Ajax发送表单104 $('.reg_btn_wrap').click(function(){105 if (phonelock == true && nicknamelock == true && passwordlock == true && confpasslock == true) {106 $('#registerForm').submit(function(){return true;});107 }else{108 $('#registerForm').submit(function(){return false;});109 alert('请正确输入相关信息!');110 return false;111 }112 // reFleshCode();113 });114//验证手机函数115 116 function checkPhone(phone,_csrf) {117 if (!phone) {118 $('<span class="msg_err"></span>').insertAfter('#mobile');119 $('<div id="msgmlsUser" class="msg_error"><span></span>'+phoneMessage[1]+'</div>').insertAfter('#mobile');120 }else if(!/^1[3|4|5|8]\d{9}$/.test(phone)){121 $('<span class="msg_err"></span>').insertAfter('#mobile');122 $('<div id="msgmlsUser" class="msg_error"><span></span>'+phoneMessage[2]+'</div>').insertAfter('#mobile');123 }else{124 $.ajax({125 url:"../user/check-phone",126 type:"post",127 dataType:"json",128 cache:false,129 data:{phone:phone,_csrf:_csrf},130 success:function(data){131 // 如果在数据库中查询到了,就返回已注册132 if(data.status == -1){133 $('<span class="msg_err"></span>').insertAfter('#mobile');134 $('<div id="msgmlsUser" class="msg_error"><span></span>'+phoneMessage[3]+'</div>').insertAfter('#mobile');135 }else{136 phonelock = true;137 }138 139 }140 });141 }142 }143//验证用户名函数144 function checkUsername(username,_csrf) {145 if (!username) {146 $('<span class="msg_err"></span>').insertAfter('#nickname');147 $('<div id="msgmlsUser" class="msg_error"><span></span>'+usernameMessage[1]+'</div>').insertAfter('#nickname');148 } else if (getStrlen(username) < 4) {149 $('<span class="msg_err"></span>').insertAfter('#nickname');150 $('<div id="msgmlsUser" class="msg_error"><span></span>'+usernameMessage[4]+'</div>').insertAfter('#nickname'); 151 } else if (getStrlen(username) > 15) {152 $('<span class="msg_err"></span>').insertAfter('#nickname');153 $('<div id="msgmlsUser" class="msg_error"><span></span>'+usernameMessage[6]+'</div>').insertAfter('#nickname'); 154 }else if (/^[0-9]{4,23}$/.test(username)) {155 $('<span class="msg_err"></span>').insertAfter('#nickname');156 $('<div id="msgmlsUser" class="msg_error"><span></span>'+usernameMessage[5]+'</div>').insertAfter('#nickname'); 157 }else if (!/^[a-zA-Z0-9_\u4E00-\uFA29]*$/.test(username)) {158 $('<span class="msg_err"></span>').insertAfter('#nickname');159 $('<div id="msgmlsUser" class="msg_error"><span></span>'+usernameMessage[2]+'</div>').insertAfter('#nickname');160 } else {161 $.post('../user/check-name',{'username':username,_csrf:_csrf},function(msg){162 if(msg.status == -1){163 $('<span class="msg_err"></span>').insertAfter('#nickname');164 $('<div id="msgmlsUser" class="msg_error"><span></span>'+usernameMessage[3]+'</div>').insertAfter('#nickname');165 }else{166 nicknamelock = true;167 }168 },"json"); 169 }170 }171//密码验证172 function checkPassword(value) {173 if (!value) {174 return 1;175 } else if (!/^[\w]{6,23}$/.test(value)) {176 return 2;177 }178 var password1 = $("#password").val(),179 password2 = $("#conf_password").val();180 if (password1 && password2) {181 if (/^[\w]{6,}$/.test(password1) && /^[\w]{6,23}$/.test(password2)) {182 if (password1 == password2) {183 return 0;184 } else {185 return 3;186 }187 } else if (value == password1 && /^[\w]{6,23}$/.test(password1)) {188 return 0;189 } else if (value == password2 && /^[\w]{6,23}$/.test(password2)) {190 return 0;191 }192 } else if (password1) {193 if (/^[\w]{6,23}$/.test(password1)) {194 return 0;195 }196 } else {197 if (/^[\w]{6,23}$/.test(password2)) {198 return 0;199 }200 }201 }202//验证码验证203 function checkCode(code){204 205 if (!code) {206 $('<span class="msg_err"></span>').insertAfter('#checkcode');207 $('<div id="msgmlsUser" class="msg_error"><span>'+captchaMessage[1]+'</span></div>').insertAfter('#checkcode');208 }else{209 $.post(url3,{code:code},function(msg){210 if(msg){211 codelock = true; 212 }else{213 $('<span class="msg_err"></span>').insertAfter('#checkcode');214 $('<div id="msgmlsUser" class="msg_error"><span>'+captchaMessage[2]+'</span></div>').insertAfter('#checkcode');215 reFleshCode();216 } 217 });218 }219 }220//获取字串长度221 function getStrlen(str) {222 //<summary>获得字符串实际长度,中文2,英文1</summary>223 //<param name="str">要获得长度的字符串</param>224 var realLength = 0, len = str.length, charCode = -1;225 for (var i = 0; i < len; i++) {226 charCode = str.charCodeAt(i);227 if (charCode >= 0 && charCode <= 128) realLength += 1;228 else realLength += 2;...

Full Screen

Full Screen

javascript.js

Source:javascript.js Github

copy

Full Screen

...35 $(window).resize(function() {36 var width = $(window).width();37 if (width < 575.98) {38 if ($("#goal1").hasClass("uno")) {39 $(".afterx").insertAfter("#goal1");40 }41 else if ($("#goal2").hasClass("dos")) {42 $(".afterx").insertAfter("#goal2");43 }44 else if ($("#goal3").hasClass("tres")) {45 $(".afterx").insertAfter("#goal3");46 }47 else if ($("#goal4").hasClass("quatro")) {48 $(".afterx").insertAfter("#goal4");49 }50 $("#goal1").on("click", function(){51 $("#goal2, #goal3, #goal4").insertAfter(".after");52 }) 53 54 $("#goal2").on("click", function(){55 $(this).insertAfter("#goal1");56 $("#goal3, #goal4").insertAfter(".after");57 })58 59 $("#goal3").on("click", function(){60 $("#goal2").insertAfter("#goal1");61 $(this).insertAfter("#goal2");62 $("#goal4").insertAfter(".after");63 }) 64 65 $("#goal4").on("click", function(){66 $("#goal2").insertAfter("#goal1");67 $("#goal3").insertAfter("#goal2");68 $(this).insertAfter("#goal3");69 }) 70 } 71 72 });73 $(window).resize(function() {74 var width = $(window).width();75 if (width < 991.98) {76 if ($("#goal1").hasClass("uno")) {77 $("#goal2, #goal3, #goal4").insertAfter(".after");78 }79 else if ($("#goal2").hasClass("dos")) {80 $("#goal3, #goal4").insertAfter(".after");81 }82 else if ($("#goal3").hasClass("tres")) {83 $("#goal4").insertAfter(".after");84 }85 else if ($("#goal4").hasClass("quatro")) {86 $(this).insertAfter("#goal3");87 }88 $("#goal1").on("click", function(){89 $("#goal2, #goal3, #goal4").insertAfter(".after");90 }) 91 92 $("#goal2").on("click", function(){93 $(this).insertAfter("#goal1");94 $("#goal3, #goal4").insertAfter(".after");95 })96 97 $("#goal3").on("click", function(){98 $("#goal2").insertAfter("#goal1");99 $(this).insertAfter("#goal2");100 $("#goal4").insertAfter(".after");101 }) 102 103 $("#goal4").on("click", function(){104 $("#goal2").insertAfter("#goal1");105 $("#goal3").insertAfter("#goal2");106 $(this).insertAfter("#goal3");107 }) 108 } 109 });110 $(window).resize(function() {111 var width = $(window).width();112 if (width > 992) {113 $("#goal2, #goal3, #goal4").insertAfter("#goal1");114 115 $("#goal1").on("click", function(){116 $("#goal2, #goal3, #goal4").insertAfter("#goal1");117 }) 118 119 $("#goal2").on("click", function(){120 $(this).insertAfter("#goal1");121 $("#goal3, #goal4").insertAfter("#goal2");122 })123 124 $("#goal3").on("click", function(){125 $("#goal2").insertAfter("#goal1");126 $(this).insertAfter("#goal2");127 $("#goal4").insertAfter("#goal3");128 }) 129 130 $("#goal4").on("click", function(){131 $("#goal2").insertAfter("#goal1");132 $("#goal3").insertAfter("#goal2");133 $(this).insertAfter("#goal3");134 }) 135 } 136 });137 if (window.matchMedia('(max-width: 575.98px)').matches) {138 $(".afterx").insertAfter("#goal1");139 $("#goal1").on("click", function(){140 $("#goal2, #goal3, #goal4").insertAfter(".after");141 }) 142 $("#goal2").on("click", function(){143 $(this).insertAfter("#goal1");144 $("#goal3, #goal4").insertAfter(".afterx");145 })146 $("#goal3").on("click", function(){147 $("#goal2").insertAfter("#goal1");148 $(this).insertAfter("#goal2");149 $("#goal4").insertAfter(".afterx");150 }) 151 $("#goal4").on("click", function(){152 $("#goal2").insertAfter("#goal1");153 $("#goal3").insertAfter("#goal2");154 $(this).insertAfter("#goal3");155 }) 156 157 }158 if (window.matchMedia('(max-width: 991.98px)').matches) {159 $("#goal2, #goal3, #goal4").insertAfter(".after");160 $("#goal1").on("click", function(){161 $("#goal2, #goal3, #goal4").insertAfter(".after");162 }) 163 $("#goal2").on("click", function(){164 $(this).insertAfter("#goal1");165 $("#goal3, #goal4").insertAfter(".after");166 })167 $("#goal3").on("click", function(){168 $("#goal2").insertAfter("#goal1");169 $(this).insertAfter("#goal2");170 $("#goal4").insertAfter(".after");171 }) 172 $("#goal4").on("click", function(){173 $("#goal2").insertAfter("#goal1");174 $("#goal3").insertAfter("#goal2");175 $(this).insertAfter("#goal3");176 }) 177 178 }179 180 if (window.matchMedia('(min-width: 992px)').matches) {181 $("#goal2, #goal3, #goal4").insertAfter("#goal1");182 183 $("#goal1").on("click", function(){184 $("#goal2, #goal3, #goal4").insertAfter("#goal1");185 }) 186 187 $("#goal2").on("click", function(){188 $(this).insertAfter("#goal1");189 $("#goal3, #goal4").insertAfter("#goal2");190 })191 192 $("#goal3").on("click", function(){193 $("#goal2").insertAfter("#goal1");194 $(this).insertAfter("#goal2");195 $("#goal4").insertAfter("#goal3");196 }) 197 198 $("#goal4").on("click", function(){199 $("#goal2").insertAfter("#goal1");200 $("#goal3").insertAfter("#goal2");201 $(this).insertAfter("#goal3");202 }) 203 }204 ...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var wptools = require('wptools');2var page = wptools.page('Albert Einstein');3page.get(function(err, info) {4 if (err) {5 console.log(err);6 } else {7 console.log(info);8 }9});10var wptools = require('wptools');11var page = wptools.page('Albert Einstein');12page.get(function(err, info) {13 if (err) {14 console.log(err);15 } else {16 console.log(info);17 }18});19var wptools = require('wptools');20var page = wptools.page('Albert Einstein');21page.get(function(err, info) {22 if (err) {23 console.log(err);24 } else {25 console.log(info);26 }27});28var wptools = require('wptools');29var page = wptools.page('Albert Einstein');30page.get(function(err, info) {31 if (err) {32 console.log(err);33 } else {34 console.log(info);35 }36});37var wptools = require('wptools');38var page = wptools.page('Albert Einstein');39page.get(function(err, info) {40 if (err) {41 console.log(err);42 } else {43 console.log(info);44 }45});46var wptools = require('wptools');47var page = wptools.page('Albert Einstein');48page.get(function(err, info) {49 if (err) {50 console.log(err);51 } else {52 console.log(info);53 }54});55var wptools = require('wptools');56var page = wptools.page('Albert Einstein');57page.get(function(err, info) {58 if (err) {59 console.log(err);60 } else {61 console.log(info);62 }63});

Full Screen

Using AI Code Generation

copy

Full Screen

1var wptoolkit = require('wptoolkit');2var $ = require('jquery');3var insertAfter = wptoolkit.insertAfter;4var $newElement = $('<div>hello world</div>');5var $targetElement = $('body');6insertAfter($newElement, $targetElement);

Full Screen

Using AI Code Generation

copy

Full Screen

1var element = document.createElement("h1");2var text = document.createTextNode("Hello world!");3element.appendChild(text);4document.body.insertAfter(element, document.body.firstChild);5var element = document.createElement("h1");6var text = document.createTextNode("Hello world!");7element.appendChild(text);8document.body.insertBefore(element, document.body.firstChild);

Full Screen

Using AI Code Generation

copy

Full Screen

1var wptools = require('wptools');2wptools.insertAfter('test.txt', 'inserted text', 'after this text', function(err, data) {3 if (err) throw err;4 console.log(data);5});6## wptools.insertBefore(file, text, before, callback)7var wptools = require('wptools');8wptools.insertBefore('test.txt', 'inserted text', 'before this text', function(err, data) {9 if (err) throw err;10 console.log(data);11});12## wptools.replace(file, text, replace, callback)13var wptools = require('wptools');14wptools.replace('test.txt', 'replaced text', 'replace this text', function(err, data) {15 if (err) throw err;16 console.log(data);17});18## wptools.delete(file, callback)

Full Screen

Using AI Code Generation

copy

Full Screen

1var wptoolkit = require('wptoolkit');2var $ = require('jquery');3var $el = $('<div>hello world</div>');4var $el2 = $('<div>hello world again</div>');5$('body').append($el);6$el2.insertAfter($el);7$el2.insertAfter('body');8var wptoolkit = require('wptoolkit');9var $ = require('jquery');10var $el = $('<div>hello world</div>');11var $el2 = $('<div>hello world again</div>');12$('body').append($el);13$el2.prependTo($el);14$el2.prependTo('body');15var wptoolkit = require('wptoolkit');16var $ = require('jquery');17var $el = $('<div>hello world</div>');18var $el2 = $('<div>hello world again</div>');19$('body').append($el);20$el2.prependTo($el);21$el2.prependTo('body');22var wptoolkit = require('wptoolkit');23var $ = require('jquery');24var $el = $('<div>hello world</div>');25$('body').append($el);26$el.remove();27$('body').remove('div');28var wptoolkit = require('wptoolkit');29var $ = require('jquery');30var $el = $('<div class="test">hello world</div>');31$('body').append($el);32$el.removeAttr('class');33$('body').removeAttr('div', 'class');34var wptoolkit = require('wptoolkit');35var $ = require('jquery');36var $el = $('<div class="test">hello world

Full Screen

Using AI Code Generation

copy

Full Screen

1var wp = require('wptools');2var $ = require('cheerio');3var page = wp.page('Barack Obama');4page.then(function(page) {5 page.html().then(function(html) {6 var $html = $(html);7 var $table = $html.find('table.infobox');8 $table.insertAfter($table.prev());9 console.log($html.html());10 });11});12var $ = require('cheerio');13var $html = $(html);14var $table = $html.find('table.infobox');15var $table2 = $html.find('table.infobox_v2');16$table.insertAfter($table2);17console.log($html.html());

Full Screen

Using AI Code Generation

copy

Full Screen

1var table = document.getElementById('table');2var row = table.rows[0];3var cell = row.cells[0];4var newCell = document.createElement('td');5var textNode = document.createTextNode('New Cell');6newCell.appendChild(textNode);7cell.insertAfter(newCell, cell.nextSibling);

Full Screen

Using AI Code Generation

copy

Full Screen

1var element = document.getElementById('element');2var newElement = document.createElement('div');3element.insertAfter(newElement, element.children[0]);4WPTB_Element.prototype.insertAfter = function(newNode, referenceNode) {5 referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);6};

Full Screen

Using AI Code Generation

copy

Full Screen

1var wp = require('wptools');2var page = new wp.page('Wikipedia:Wikipedia_Signpost/2016-03-28/News_and_notes');3page.sections(function(sections) {4 var section = sections[0];5 var newSection = 'This is a new section';6 section.insertAfter(newSection);7});8var wp = require('wptools');9var page = new wp.page('Wikipedia:Wikipedia_Signpost/2016-03-28/News_and_notes');10page.sections(function(sections) {11 var section = sections[0];12 var newSection = 'This is a new section';13 section.insertBefore(newSection);14});15var wp = require('wptools');16var page = new wp.page('Wikipedia:Wikipedia_Signpost/2016-03-28/News_and_notes');17page.sections(function(sections) {18 var section = sections[0];19 var newSection = 'This is a new section';20 section.insertAt(0, newSection);21});22var wp = require('wptools');23var page = new wp.page('Wikipedia:Wikipedia_Signpost/2016-03-28/News_and_notes');24page.sections(function(sections) {25 var section = sections[0];26 section.deleteSection();27});28var wp = require('wptools');29var page = new wp.page('Wikipedia:Wikipedia_Signpost/2016-03-28/News_and_notes');30page.sections(function(sections) {31 var section = sections[0];32 var newSection = 'This is a new section';33 section.replaceSection(newSection);34});35var wp = require('wptools');36var page = new wp.page('Wikipedia:Wikipedia_Signpost/2016-03-28/News_and_notes');37page.sections(function(sections) {38 var section = sections[0];39 var newText = 'This is a new section';40 section.replaceText(newText);41});42var wp = require('

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run wpt automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful