フォームのチェックボックスをjavascriptを使って全選択し、チェックボックスの値を配列として受け取る。 <SCRIPT TYPE=”text/javascript”> <!– function allcheck(targetForm,flag){  for(n=0;n<=targetForm.length-1;n++){   if(targetForm.elements[n].type == "checkbox"){    targetForm.elements[n].checked = flag;   }  } } --> </SCRIPT> <input type=”button” value=”全選択” onClick=”allcheck(this.form,true)”/> <input type=”button” value=”全解除” onClick=”allcheck(this.form,false)”/> <label><input name=”reg_check[]” type=”checkbox” value=”1″ /> 相互リンクを申請する <label><input name=”reg_check[]” type=”checkbox” value=”2″ /> 相互リンクを申請する <label><input name=”reg_check[]” type=”checkbox” value=”3″ /> 相互リンクを申請する <label><input name=”reg_check[]” type=”checkbox” value=”4″ /> 相互リンクを申請する

この投稿へのコメント

コメントはまだありません。

コメントを残す

メールアドレスが公開されることはありません。

次のHTML タグと属性が使えます。
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CAPTCHA


ピックアップ記事

UITableView のcellの複数選択を実装する

2011年01月25日 過去Blog
//セルが選択された際に呼び出される - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //選択されたセルを取得 UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; /…
「UITableView のcellの複数選択を実装する」をはてなブックマークに追加

php でIPアドレスを取得

2010年02月03日 過去Blog
// IPアドレスを取得して変数にセットする $ipAddress = $_SERVER["REMOTE_ADDR"];
「php でIPアドレスを取得」をはてなブックマークに追加

iPhoneのメールの受信エラー[ “i.softbank.jp” が応答しません]

2010年12月29日 過去Blog
twitterでも始めようかと思い、iPhoneから登録作業をしてたのですが、twitterに空メールを送った後に、以下のエラーが出てきて、送られてくるメールが受信出来ない状態になりました。 「imap.softbank.jp」が応答しません。メール設定で入力されているアカウント情報が正しい事を確認してください。 …
「iPhoneのメールの受信エラー[ “i.softbank.jp” が応答しません]」をはてなブックマークに追加

mac で windows キーボードのhome、 end

2010年10月14日 過去Blog
windowsでは細かいところでキーボードのhomeボタン、endボタンを使うことが多かったのですが、Macでは、どうすればいいのか。。。 cmd + 矢印キーで実現できました。 cmd+shift+矢印で選択できます。 参考サイト http://firstmac.blogspot.com/2007/06/home.html
「mac で windows キーボードのhome、 end」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy