HTML Form ãã§ãã¯ããã¯ã¹ã off ã®æã®å¤
ä»æ´ãªããã«ç¥ã£ããã¨ãããã¾ãã
HTML Form ã§ãã§ãã¯ããã¯ã¹ã使ãã¨ããoff ã®æã¯ãã¼ã¿ãéä¿¡ãããªã訳ã§ãããããã§ã¯ãã§ãã¯ããã¯ã¹ã® on/off ã§ãµã¼ãã¼å´ã®ãã¼ã¿ã®ç¶æ ãå¤åããããå ´åçã§åé¡ãããã¾ããã¤ã¾ãããã§ãã¯ããã¯ã¹ã on ã®æã¯ã'on' ã¨ãoff ã®æ㯠'off' ã¨ããå¤ãéä¿¡ãã¦æ¬²ããããã§ãã
ããããæãããã¾ã§åã¯ãjavascript ã使ã£ãããPHP ã¹ã¯ãªããå´ã§èª¤éåããããã¦ããããã§ããããããªãã¨ã¯ããªãã¦ãè¯ãã£ããã§ããã
次ã®ã½ã¼ã¹ã§è§£æ±ºã£ãã
<input type="hidden" name="completed" value="off" /> <input type="checkbox" name="completed" value="on" />
PHP ã®å ´åãåã name å±æ§ã®æã¯ãå¾ã®å¤ãåªå
ãããããã§ããã¤ã¾ãããã§ãã¯ããã¯ã¹ã on ã®æã¯ãå¾ã«æ¸ããã checkbox ã®å¤ 'on' ãæå¹ã§ããã§ãã¯ããã¯ã¹ã off ã®æã¯ãåã®å¤ã® hidden ã®å¤ 'off' ãæå¹ã«ãªãããã§ãã
ããããã°â¦ã¨ãPerl 㧠CGI ãåå¼·ããã¯ããæãå°ãæãåºãã¾ããã
PHP 㯠http ãè¯ãé è½ãã¦ãã¾ãããããããäºãæãã¤ããªããªãã¾ããã
ã¨ãããã¨ã§ããããªãã¨ãä»æ´è¨ã£ã¦ããã¨ããã¡ãã¡ãããï¼