Best JavaScript code snippet using wpt
vacc.js
Source:vacc.js
...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 }...
reg.js
Source:reg.js
...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;...
javascript.js
Source:javascript.js
...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 ...
Using AI Code Generation
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});
Using AI Code Generation
1var wptoolkit = require('wptoolkit');2var $ = require('jquery');3var insertAfter = wptoolkit.insertAfter;4var $newElement = $('<div>hello world</div>');5var $targetElement = $('body');6insertAfter($newElement, $targetElement);
Using AI Code Generation
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);
Using AI Code Generation
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)
Using AI Code Generation
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
Using AI Code Generation
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());
Using AI Code Generation
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);
Using AI Code Generation
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};
Using AI Code Generation
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('
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!