ããããã¯ã©ã€ã¢ã³ã/ãµãŒããŒã¢ããªã±ãŒã·ã§ã³ãããå Žåãéçºè ã¯åãªã³ã¯ã«å¢çãèšå®ã§ããŸãã
ãããŠãã¹ã¿ãŒã¯ããããã¹ãŠããã§ãã¯ããªããã°ãªããŸãããã©ãããŠïŒåãå€ãç°ãªãå Žæã§äœåºŠãè€è£œãããšãééã£ãŠããå¯èœæ§ãéåžžã«é«ããªãããã§ããåæã«ãã¯ã©ã€ã¢ã³ãã®å¢çç·ã¯ç°¡åã«åé€ã§ããŸãããŠãŒã¶ãŒãã¯ã©ã€ã¢ã³ãã®å¢çã移åãããšã©ããªããŸããïŒåœŒã¯ç§ãã¡ã®ãµã€ãã倧ããªã©ã€ã³ã§å£ããŸããïŒ
ãã®èšäºã§ã¯ãWebãã©ãŒã ã§ãã£ãŒã«ãã®å¢çç·ãèŠã€ããæ¹æ³ã玹ä»ããŸããããšãã°ããŠãŒã¶ãŒç·šéãã©ãŒã ãèŠãŠã¿ãŸãããç¡æã®ãŠãŒã¶ãŒã·ã¹ãã ã
ã³ã³ãã³ã
- 1.ã¯ã©ã€ã¢ã³ãã®ããŒããŒ
- 2.ãµãŒããŒã®å¢ç
- 3.ããŒã¿ããŒã¹ã®å¢ç
- åèšïŒå¢çãèŠã€ããããã®ãã§ãã¯ãªã¹ã
1.ã¯ã©ã€ã¢ã³ãã®ããŒããŒ
æ倧é·
ã¯ã©ã€ã¢ã³ãã®è¡ã®é·ãã®å¶éã¯ããã£ãŒã«ãã®maxlengthãã©ã¡ãŒã¿ãŒã§èŠå®ãããŠããŸãã
ãããèŠã€ããã«ã¯ã次ã®ãã®ãå¿ èŠã§ãã
- éçºè ããã«ãéããŸã-f12ãæŒããŸãã
- 巊端ã®ãã¿ã³ãæŒããŠãããŒãžäžã®èŠçŽ ã®äžã«ã«ãŒãœã«ã移åããŸãã
åºæ¥äžããïŒãã£ãŒã«ããname1ãã«ã¯ã10æåã®å¶éããããŸãã
åç §ïŒ
ãã¹ã¿ãŒãéçºè ããã«ã«ã€ããŠç¥ã£ãŠããã¹ãããš
å¶éã®ç¢ºèª-10æå以äžã®å ¥åãè©Šã¿ãŸããããããæ£ç¢ºã«10ãå°å ¥ããããã以äžã¯äžããããŸãããããŒããŒãã§å ¥åãããšãã·ã¹ãã ãå¿çããªã
ãªããŸãããããå¢çã§ããåœå¢ã¯ã¯ã©ã€ã¢ã³ãã«ãããŸãã
ããããããã¯ããªããããã®ããã«èœã¡çãå¿ èŠãããããšãæå³ããŸãããã¯ã©ã€ã¢ã³ãã®ããŒããŒã¯éåžžã«ç°¡åã«åé€ã§ããããããµãŒããŒã確èªããããšãéèŠã§ãããŸãããã¹ã¿ãŒãšããŠããµãŒããŒãä¿è·ãããŠãããã©ããã確èªããå¿ èŠããããŸãã
ãããã£ãŠãããŒããŒãåé€ããŸãããããè¡ãã«ã¯ãDOMã¢ãã«ïŒã€ã³ã¹ãã¯ã¿ãŒã§æ€çŽ¢ããããŒãžã®æ§é ïŒã®å³åŽã§ããã©ã¡ãŒã¿ãŒã䜿çšããŠè¡ãä¿®æ£ããŸããã¯ããå€åããŠããŸãã maxlengthãã©ã¡ãŒã¿ãããã«ã¯ãªãã¯ããŠãå€ãå€æŽããŸããåºæ¥äžããïŒä»¥åãããå€ãã®æåãå ¥åã§ããããã«ãªããŸããïŒ
泚æããŠãã ãã-ããŒãžãæŽæ°ããã«æåãããã«å ¥åã§ããŸããããã«ãããŒãžãæŽæ°ãããšãå€æŽã倱ãããŸããçµå±ã®ãšãããããŒãžãæŽæ°ãããšããµãŒããŒããHTMLã³ãŒããèŠæ±ãããããã«å€æŽã¯ãããŸãããã ããã奜ããªã ããã¬ã€ããŠãäœããå£ãããšãæããªãã§ãã ãã=ïŒ
ååãšããŠããµãŒããŒã®å¢çã確èªããã«ã¯ãæåã«å€ã10ãã1000ã«å€æŽã§ããŸãããŸãã¯ããã©ã¡ãŒã¿ãå®å šã«åé€ããŸããéžæããŠåé€ïŒ
ã€ã³ã¹ãã¯ã¿ãŒã§ã¢ã€ãã ãèŠã€ãããšãmaxlength以å€ã®æ°å€ã衚瀺ãããŸããããšãã°ã"data-max"ã"data-jsmax"ãªã©ããããã¯å¢çãšèŠãªãããšãã§ããŸããïŒã³ãŒããèªãã§ãã®æå³ãèŠã€ããããšãã§ããå Žåã®ã¿ã
éçºè ã¯HTMLã奜ããªããã«æžãããšãã§ããŸãã圌ã¯ã¿ã°ã®å±æ§ãä»»æã®ååã§æå®ã§ããŸããããããªãããã®åœå¢ã«ãªããšããã®ã¯æ±ºããŠäºå®ã§ã¯ãããŸããã
ããã¯ãã¬ã¬ã·ãŒãèŠçŽ ã«ããããšãã§ããŸããã€ãŸããåŠçã䜿çšããããŸãããåé€ããã®ãå¿ããŸããããŸãã¯ãCSSã«äœ¿çšããããšãã§ããŸããããã®ãããªå€ãããå Žåã¯çœã§ããããããå Žåã¯é»ã§æžããŠãã ãããã
ãããŠããã«maxlengthããããŸãæšæºå±æ§ã§ãããããŠãèšå®ãããŠããå ŽåããŠãŒã¶ãŒãå¶éããŸã-ãŠãŒã¶ãŒã¯ãmaxlengthã§æå®ãããæ°ããå€ãã®æåãå ¥åãã£ãŒã«ãã«å ¥åã§ããŸããããããå¢çã§ãã
ãããŠãä»ã®ãã¹ãŠ-ãããäœããã®åœ¢ã§ç§ãã¡ãå¶éãããã©ããã確èªããå¿ èŠããããŸãã確èªæ¹æ³ã¯ïŒã³ã³ãœãŒã«ããªã³ã«ããŠãã ããïŒ
JSã³ã³ãœãŒã«ã®ãšã©ãŒ
Webããã¹ããããšãã¯ãå¿ ãã³ã³ãœãŒã«ãæå¹ã«ããŠãã ããã
F12âã³ã³ãœãŒã«
ãããŠã圌女ãç§ã®ç®ã®é ããèŠãŠãã ããããã以å€ã®å Žåã¯ããšã©ãŒãã¹ãããã§ããŸãã
ã·ã¹ãã ã§åé¡ãçºçããããšã¯ãããŸãããã€ã³ã¿ãŒãã§ãŒã¹èªäœã¯äœãå€ãããŸããããã£ãŒã«ãã«ããŒã¿ãå ¥åããŸããïŒèµ€ã§åŒ·èª¿è¡šç€ºãããŠãããã®ã¯ãããŸããããã³ã³ãœãŒã«ã«ãšã©ãŒã衚瀺ãããŸãããã¿ã³ãæŒããŠããŸããïŒã¬ããŒããèªã¿èŸŒãã§ããŸããããã¹ãŠåé¡ãªãããã§ãããã³ã³ãœãŒã«ã«ãšã©ãŒããããŸãã
ã³ã³ãœãŒã«ã«ãšã©ãŒã衚瀺ãããå Žåãããã¯æ£åžžã§ã¯ãããŸããããããŠããã¯æ±ãããªããã°ãªããªãããšã©ãŒã®åœ±é¿ãé ãããããã®çç¶ã«æ°ã¥ããªãã£ãå¯èœæ§ããããŸããããšãã°ãã¬ããŒããããŒããããšãã«ãã³ã³ãœãŒã«ã«æžã蟌ãã ããŒã¿ãããŒãã§ããªãã£ãããã1ã€ã®ã»ã«ã誀ã£ãŠã«ãŠã³ããããŸãããåæã«ãã¬ããŒããèªã¿èŸŒãŸããå éšã«ããŒã¿ãããããã«èŠããŸããããããééãããããŸãã
ãããã£ãŠãã³ã³ãœãŒã«ãéããŠããŠãŒã¶ãŒãã£ãŒã«ãã«å ¥åããŸããããšãã°ãããŒã¿ãããã ã¹ã¿ãŒããã£ãŒã«ãã«å ¥åããŸããã¯ã©ã€ã¢ã³ãã®å¢çç·ïŒmaxlengthïŒãåé€ããŠå°å·ããŸããããããŠãã³ã³ãœãŒã«ã«ãšã©ãŒã衚瀺ãããããšãããããŸãïŒ
éçºè ããã£ãŒã«ããããã«ä¿è·ããŠããããšãããããŸãã maxlengthã«å ããŠãã³ãŒãã«å¶éãæžããŸãããããããããŠãŒã¶ãŒãäœããééã£ãŠããããšããŠãŒã¶ãŒã確èªã§ããããã«ããã®ã¡ãã»ãŒãžãã€ã³ã¿ãŒãã§ãŒã¹ã«è¡šç€ºãããŠããã¯ãã§ãããéçºè ã¯æ··ä¹±ããŠãããã³ã³ãœãŒã«ã«åºåããŸããã
ãŠãŒã¶ãŒã®å Žåãéçºè ã¯äœãæ··ä¹±ããããTKã«åŸã£ãŠã³ã³ãœãŒã«ã«ãã®ãããªã¡ãã»ãŒãžã衚瀺ããå¿ èŠããããŸããã
ããããåœå¢ã¯ã©ãã§ããïŒãšã©ãŒã¡ãã»ãŒãžãMaximum-10ãã§å€æããããã£ãŠãå¢çç·ã¯10æåã§ããã¯ãïŒãã¡ãããããªãïŒå¢çã¯ãã·ã¹ãã ã®åäœã®åïŒãšã©ãŒãªãïŒãšæ¬¡ã®åäœãããå Žåã§ãã
ãšã©ãŒã¡ãã»ãŒãžãã³ãŒãã§ããããããã¹ãããå¿ èŠããããŸããéçºè ã¯ééããç¯ããã¡ãã»ãŒãžã誀ã£ãŠæžã蟌ãå¯èœæ§ããããŸããããã§ã¯ãå ¥åã«å¯Ÿããã·ã¹ãã ã®å¿çãå€åããå Žæã確èªããŸãããã
ã³ã³ãœãŒã«ãèŠãŠãæåããã£ããå ¥åãå§ããŸãã
- 10-ãšã©ãŒãªã
- 11-ãšã©ãŒãªã
- 12ã¯ééãã§ãïŒ
ãããããã¯JSã«ããå¢çç·ã10ã§ã¯ãªã11æåã§ããããšãæå³ããŸãïŒ11æ¥ãŸã§ã¯ãã¹ãŠåé¡ãªãããã®åŸã¯ééãã次第ã«çºçãå§ããŸãããããŠããšã©ãŒã¡ãã»ãŒãžã¯åã§ããããšãå€æããŸããããããã£ãŠããä¿¡é Œãããæ€èšŒããã=ïŒ
ãããã¯ã©ã€ã¢ã³ãã®å¢çã§ãããããã£ãŠããã ã¹ã¿ãŒã®ãã£ãŒã«ãã«ã¯ãã¯ã©ã€ã¢ã³ãã«2ã€ã®å¢çããããŸãã
- maxlength = 10æå
- js = 11æå
ãããããã£ãŒã«ããåå1ãã§ã¯ãã¯ã©ã€ã¢ã³ãã®1ã€ã®å¢çç·ïŒmaxlength = 10æåãæåãå ¥åãããšãã«ã³ã³ãœãŒã«ã«ãšã©ãŒã¯ãããŸããã
è¡åå€å
å¢çã¯ããšã©ãŒãã³ã³ãœãŒã«ã«æ³šããããšãã ãã§ã¯ãªãããšãããäžåºŠåŒ·èª¿ããããšæããŸãããŸãããŠãŒã¶ãŒã«è¡šç€ºãããã·ã¹ãã åäœã®å€æŽã«ãªãå ŽåããããŸãã
ããšãã°ãã¢ããªã¹ãã¯ååã3æå以äžã§ããããšã決å®ããŸããããããã£ãŠããŠãŒã¶ãŒãååã®ãããã£ãŒã«ãã«ã«ãŒãœã«ã眮ããšããã®åšãã«èµ€ããã¬ãŒã ã衚瀺ãããäžéšã«ãååã¯3æå以äžã«ããå¿ èŠããããŸãããšãããã£ãã·ã§ã³ã衚瀺ãããŸãã1ã2æåå ¥åããŸããããäœãå€ãã£ãŠããŸãããå ¥å3-眲åã®ãããã¬ãŒã ãæ¶ããŸããããŸãã¯ããã¬ãŒã ãèµ€ããç·ã«å€ãããŸããã
ãŠãŒã¶ãŒã«ã¯ãã®ãããªå¢çã¯ãªãã®ã§ãç§ã¯ã€ã³ã¿ãŒãããããåçãæ®ã£ãã ãã§ã=ïŒ
ããã¯ãTORã«åŸã£ãŠç¢ºç«ãããäžéã§ãããããŠã¯ã©ã€ã¢ã³ãã§äœãããŸãããåæ§ã«ãäžéšã®å¢çç·ã調æŽã§ããŸãã10æå以äžå ¥åããŸãããïŒãã£ãŒã«ãã®åšãã«èµ€ãæ ã衚瀺ãããŸãããããåœå¢ã§ãã
ã¯ã©ã€ã¢ã³ãã®ç·ããŒããŒ
ã¯ã©ã€ã¢ã³ãã®å¢çç·ã¯ãæåå ¥åãã£ãŒã«ãã®ãmaxlengthãå±æ§ã®å€ã§ãããã®å€ãè¶ ããŠå ¥åããããšã¯ã§ããŸãããã·ã¹ãã ã¯ãããèš±å¯ããŸããã
ãã®å¶éã¯ãéçºè ããã«- ãã¹ãŠã®ãã©ãŒã ãã£ãŒã«ãããmaxlengthãåé€ããæ¹æ³ã§ç°¡åã«åãé€ãããšãã§ããŸãã
ãããå¯äžã®å¢çã§ã¯ãªããããããŸãããéçºè ã¯ãã³ãŒãã«å¢çç·ãæžã蟌ãããšãã§ããŸãããããèŠã€ããããã«ãç§ãã¡ã¯ã·ã¹ãã ã«åŸããŸãã圌女ã圌女ã®è¡åãå€ãããªãã°ãæã ã¯å¢çãèŠã€ããŸããïŒ
- èšå·ãå ¥åãããšããã£ãŒã«ãã«èµ€ãæ ãšãé·ãããããšãã眲åããããŸã-æ ïŒãmaxlengthãã«å ããŠãéçºè ã¯ãã§ãã¯ãè¿œå ããŸãã
- æåãå ¥åãããšããšã©ãŒãã³ã³ãœãŒã«ã«è¡šç€ºãããŸã-å¢çç·ãïŒ
2.ãµãŒããŒã®å¢ç
ãµãŒããŒã®å¢çã¯ãã·ã¹ãã ã«æ ŒçŽã§ããæåæ°ã§ããçè«çã«ã¯ãã¯ã©ã€ã¢ã³ãã®å¢çãšäžèŽããå¿ èŠããããŸã=ïŒããããäœããèµ·ããå¯èœæ§ããããŸãã 1ã€ã®å€ãå¥ã®å Žæã«æžã蟌ãå¿ èŠãããå Žåãåžžã«ééããããå¯èœæ§ããããŸãã
ã¯ã©ã€ã¢ã³ãã®å¢çç·ã¯ç°¡åã«åé¿ã§ããããããã¹ãäžã«å¿ ããããè¡ãå¿ èŠããããŸãããããŠããµãŒããŒã«å¢çããããã©ããã確èªããŸãããããŠããããããªããã©ããã
ãŠãŒã¶ãŒã®maxlength = 10å¶éããname1ããã£ãŒã«ãããåé€ããããã«é·ãæååãå ¥åããŠä¿åããŠã¿ãŸããããä¿åæã«ãã·ã¹ãã ã¯ãšã©ãŒãåºããŸãïŒ
ããã¯ãµãŒããŒã®å¢çã§ããã¯ã©ã€ã¢ã³ãã¯ãªã¯ãšã¹ãããµãŒããŒã«éä¿¡ãããµãŒããŒã¯ããã解決ããŠãã£ãŒãããã¯ãè¿ããŸããã
åœå¢ãã©ãã«ããããç解ããããšã¯æ®ã£ãŠããŸãããã¡ããããã®ãšã©ãŒã¡ãã»ãŒãžã¯ããå®éïŒ37ãæ倧ïŒ9ãã®å©ãã«ãªããŸãã... çè«çã«ã¯ããµãŒããŒã«ã¯9æåã®å¶éããããŸããããããããã¯ãã§ãã¯ããå¿ èŠãããããšã¯ãã§ã«ç¥ã£ãŠããŸãïŒ
ç§ãã¡ã¯ãã§ãã¯ããŸãïŒ
- 9æåãå ¥åããŠä¿å-ä¿åïŒ
- 10æåãå ¥å-ä¿åã
- 11æåãå ¥å-ä¿åäžã®ãšã©ãŒã
ã€ãŸãããµãŒããŒäžã®å®éã®å¢çç·ã¯10æåã§ããã¯ã©ã€ã¢ã³ãã®å¢çç·ãšäžèŽããŸããããã¯è¯ãããšã§ãã
ãã ã¹ã¿ãŒã®ãã£ãŒã«ãã確èªããŠã¿ãŸãããã
ãããããã§ã¯åœå¢ãéããŸããã¡ãã»ãŒãž19ã§ã¯ãåãã€ããŠããããšãèŠããŠããŸãããã§ãã¯ããŸã-ããŒããŒã¯20æåã§ããã¯ã©ã€ã¢ã³ãã§ã¯ãmaxlengthã§10ã§ããããããã£ãŠãå¢çã¯ç°ãªããŸãã
äžè¬çã«ãå¢çãäžèŽããå¿ èŠããããããããããã°ãæçš¿ããçç±ã§ãã確ãã«ãããã¯ãä¿®æ£ããªãããšããŠéããããšãã§ããããå°ãç¯çŽã§ããŸããéçºè ãä»ã®æ¹æ³ã§ééã£ãŠããå Žåãããã¯ããã«æªåããŸãã
- ãµãŒããŒ-10æå
- ã¯ã©ã€ã¢ã³ã-20æå
ãã®çµæãã¯ã©ã€ã¢ã³ãã§ã¯20æåãå ¥åã§ããŸãããä¿åãããšãšã©ãŒãçºçããŸããè¯ããªãïŒ
ãé©åãªãéçå ã®äžéã確èªããåŸãæè¡çãªå¢çãæ¢ã䟡å€ããããŸããã¯ã©ã€ã¢ã³ãã®å¶éãåãé€ããæ°çŸäžæåãå°å ¥ããŸãããããã¯ãšãŠãç°¡åã§ããã倧ããªæååãçæããæ¹æ³ãããŒã«ãã®èšäºããä»»æã®ããŒã«ãåãåºãã眮ãæããä¿åããŸãã
ã·ã¹ãã ã以åãšãŸã£ããåããšã©ãŒãåºããå ŽåãçŽãããã¯ãæè¡çãªå¢çç·ããªãããšãæå³ããŸãããŸããããã¯ããã§ããäž»ãªããšã¯ãæ€çŽ¢ããããšããããšã§ã=ïŒ
ãªããããè¡ãå¿ èŠãããã®ã§ããïŒã·ã¹ãã ã¯ããŒã¿ãä¿åã§ããã ãã§ãªãããªãããã®æ¹æ³ã§ååŠçã§ããããã§ããç¶æ ãªã©ã§ç¢ºèªããŠãã ããããããŠãã·ã¹ãã ã¯å°ããªã©ã€ã³ããã¹ã¿ãŒããŸããããã¯ã巚倧ãªã©ã€ã³ã§ã¯ãããŸããã
以äžãåç §ããŠãã ããã
æ³äººã®ãã³ãã®æè¡çå¢ç -1000æåãå ¥åããŠãäœãèµ·ãããŸãããããæŠäºãšå¹³åãã®å Žåã¯...
3.ããŒã¿ããŒã¹å ã®å¢ç
ããŒã¿ããŒã¹ã®å¢çã¯ãããŒã¿ããŒã¹ã«é©åããæåæ°ã§ããããŒã¹ãäœæãããšããåãã£ãŒã«ãã®æ¬¡å ã瀺ããŸããããã«äººã ããã®äŸããããŸãïŒ
- å§-VARCHARïŒ255ïŒ
- åå-VARCHARïŒ100ïŒ
- åž-VARCHARïŒ20ïŒ
ããã¯ããã£ãŒã«ããå§ãã«ã255æåãåå100ãããã³éœåž-20ãæ ŒçŽã§ããããšãæå³ããŸããããã§ãã倧ããªæååãããã·ã¥ããããšãããšãã·ã¹ãã ã¯ã·ãªãŒãºãORA-06502ïŒPL / SQLïŒæ°å€ãŸãã¯å€ã®ãšã©ãŒããããšã©ãŒãçæããŸãïŒæååãããã¡ãå°ããããŸãã
ãµãŒããŒã«ããŒããŒããªãå Žåã«ã®ã¿ããŒã¿ããŒã¹ã®ããŒããŒã衚瀺ãããããšãç解ããããšãéèŠã§ããå¢çç·ã®æ€çŽ¢ãã¹ã¯å€æŽãããŸããã
- ã¯ã©ã€ã¢ã³ãã®ããŒããŒãåé€ããŸãã
- 倧ããªç·ãè©°ãã
- ä¿åããããšããŠããŸã
ãããã£ãŠãéçºè ããµãŒããŒã«å¢çç·ãèšå®ããå ŽåãåŠçããããšã©ãŒã衚瀺ãããŸã-éåžžã«æå³ã®ããããã¹ãã§çŸããïŒãŸãã¯ããã§ã¯ãªãïŒã¬ã³ããªã³ã°ãããŸããéçºè ããããæžããŠããããç§ãã¡ã®ã¢ããªã±ãŒã·ã§ã³ã«é¢ãããã®ã ããã§ãã
ãµãŒããŒã«å¢çç·ããªãå Žåã¯ãæªåŠçã®ãšã©ãŒã衚瀺ãããŸãããORA-06502ïŒ..ãã®ãããªãšã©ãŒããŸãã¯ã³ãŒãã¹ããªãŒã ãã¬ãŒã¹-éåžžã®ãŠãŒã¶ãŒã«ã¯ç解ã§ããªãæåã®æã§ããå¯èœæ§ããããŸãã
ãã¡ãããå¥ã®ç¶æ³ãçºçããå¯èœæ§ããããŸã-å¢çç·ãããŒã¿ããŒã¹ãããµãŒããŒã®æ¹ã倧ããå ŽåïŒ
- ãµãŒããŒ-20æå
- DB-10æå
ãããŠãããã¯é¢çœãç¶æ³ã§ããããšãå€æããŸãããã¯ããç§ãã¡ã¯ãæŠäºãšå¹³åãã®æ¿å ¥ãã身ãå®ã£ãŠããŸããã25æåãŸãã¯2500äžæåãå ¥åãããšãæå³ã®ãããšã©ãŒãçºçããŸãããããã11æåå ¥åãããšãããïŒå šç»é¢è¡šç€ºã§å€§ãããŠæãã¹ã¿ãã¯ãã¬ãŒã¹ã
ãããã£ãŠããã©ãã¯ããã¯ã¹ããã¹ããããšãã¯ãäžåºŠã«ããããã®æåãææ¡ããããšããªãã§ãã ãããæåã«æå³ã®ããæå³ãè©ŠããŠãã ããããŸããã¯ã©ã€ã¢ã³ãã®å¶éãåé€ããå Žåã¯ããã®å¢çå€ãè©Šã䟡å€ããããŸããmaxlength = 10ã§ãããïŒ11æåãè©ŠããŠãã ããããããŠ5500äžããããŠ5500äžã
åèšïŒå¢çãèŠã€ããããã®ãã§ãã¯ãªã¹ã
ã¯ã©ã€ã¢ã³ã/ãµãŒããŒã¢ããªã±ãŒã·ã§ã³ã§ã¯ãåãªã³ã¯ã«å¢çãèšå®ã§ããŸãããããŠãçæ³çã«ã¯äžèŽããå¿ èŠããããŸããããããç§ãã¡ã¯ããããã§ãã¯ããå¿ èŠããããŸãïŒ
ããå€ãã®å¢çããããããããŸãããã¯ã©ã€ã¢ã³ãã§ã¯ãéçºè ã¯ããã€ãã®å¢çãäžåºŠã«èª²ãããšãã§ããŸãïŒmaxlengthãšãç¹å®ã®ã©ã€ã³ïŒjsã³ãŒãïŒãè¶ãããšãã®åäœã®å€æŽã
å¢çç·ãå°ãªãå¯èœæ§ããããŸããã·ãªãŒãºããŠãŒã¶ãŒã«æãããå ¥ããããªããããããã®çµæãã¯ã©ã€ã¢ã³ããšãµãŒããŒã«å¶éã¯ãããŸãããããããããŒã¿ããŒã¹å ã®ãã£ãŒã«ãã®æ¬¡å ã¯æ®ããŸãã
å¢çãèŠã€ããæ¹æ³ïŒ
1.ãã£ãŒã«ãã«maxlengthããããã©ããã確èªããŸã-ããã¯ã¯ã©ã€ã¢ã³ãã§æãæçœãªå¢çã§ãã
2. ãã®å¶éãåé€ããŸãã
3. JSã³ã³ãœãŒã«ãæå¹ã«ããŸãïŒãããªãã§ã©ãã«è¡ãããšãã§ããŸããïŒïŒã
4.åãã£ãŒã«ãã«çŽ50ã100人ã®ãã£ã©ã¯ã¿ãŒãé 眮ãå§ããŸãããã¡ããŒã¢ããïŒ
- â ?
- â ?
ã·ã¹ãã ã®åäœãå€åããå ŽåããŸãã¯ã³ã³ãœãŒã«ã«ãšã©ãŒã衚瀺ãããå Žåãããã¯ã¯ã©ã€ã¢ã³ãã®å¢çã§ããããŸãããããããã1ã€ã¯jsã³ãŒãã§ãã
5.ãããã®50ã100æåãä¿åããŠã¿ãŸããããã¯ããµãŒããŒäžããã³/ãŸãã¯ããŒã¿ããŒã¹å ã®å¢çãæ¢ãæ¹æ³ã§ãã
ã·ã¹ãã ãããã£ãŒã«ããé·ãããŸãããªã©ã®æå³ã®ãããšã©ãŒãçæããå Žå-ããã¯ãµãŒããŒã®ãšã©ãŒã§ãããšã©ãŒãåŠçãããªãå Žåã¯ããµãŒããŒã«å¢çç·ããªããããŒã¿ããŒã¹ã§å¢çç·ãèŠã€ããå¯èœæ§ããããŸãã
äºåå²æ³ã䜿çšããŠãå¢çç·ã®æ£ç¢ºãªå€ãèŠã€ããããšãã§ããŸãããŸãããŸãã¯ãšã©ãŒã¡ãã»ãŒãžã®ãã°/ããã¹ãã䜿çšããŸãã
6. 1ååã®ã·ã³ãã«ïŒããŒã«ïŒãå°å ¥ããããããä¿åããŠæè¡çããã³ãã£ã¢ãèŠã€ããããšããŸãã
ãã®èšäºã§ã¯ããã®ãã§ãã¯ãªã¹ãã䜿çšããŠããŠãŒã¶ãŒã·ã¹ãã ã®ãname1ããã£ãŒã«ããšãhamsterããã£ãŒã«ãã確èªããŸãããçµæïŒ
Name1ãã£ãŒã«ãïŒ
- maxlength-10æå
- ãµãŒããŒ-10æå
ãã ã¹ã¿ãŒãã£ãŒã«ãïŒ
- maxlength-10æå
- js-11æå
- ãµãŒããŒ-20æå
ãã¹ãŠãååã«é©ããŠããŸããå¢çã¯äžèŽããŠããŸããããããããã ã¹ã¿ãŒãã調ã¹ããšãããã¯ã©ã€ã¢ã³ããšãµãŒããŒã®å¢çïŒ10ãš20ïŒã®éããšã³ã³ãœãŒã«ã®ãšã©ãŒã®2ã€ã®åé¡ãäžåºŠã«èŠã€ãããŸããããã°ãæçš¿ã§ããŸãïŒ