フォームのチェックボックスを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


ピックアップ記事

addressbook内のデータをtableViewに表示させる

2011年01月17日 過去Blog
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusab…
「addressbook内のデータをtableViewに表示させる」をはてなブックマークに追加

jQueryの基本

2011年06月16日 過去Blog
ここでは、jQuery初心者の方へ向けに、jQueryの基本的な使い方、使うメリットなどをまとめていきます。jQueryは簡単なコードで、サイトに大きな効果をつけることが可能ですので、デザイナーさんやコーダーの方も是非、試してみてください☆…
「jQueryの基本」をはてなブックマークに追加

ABPeoplePickerNavigationControllerのキャンセルボタンを無効にし、新規追加ボタンを実装する

2011年01月17日 過去Blog
viewController内に以下のようにインターフェースを宣言します。 @interface ABPeoplePickerNavigationController (Expose) @property (nonatomic, assign) BOOL allowsCancel; @property (nonatomic, assign) BOOL allowsCardEditing; @end 同じファイル内に、以下のように設定します。 ABPeoplePickerNavigationController *contactsNavController = [[ABPeoplePickerNavigationController alloc] init]; contactsNavController.tabBarItem.title = @"連絡先"; contactsNavController.allowsCancel = NO; contactsNavController.allowsCardEditing = YES; contactsNavController.peoplePickerDelegate=self; …
「ABPeoplePickerNavigationControllerのキャンセルボタンを無効にし、新規追加ボタンを実装する」をはてなブックマークに追加

PHP 配列から空白要素を削除する

2010年02月20日 過去Blog
配列 $array_exampleの要素のなかで、空白のものを削除。 $array_example = array_filter($array_example, 'strlen');
「PHP 配列から空白要素を削除する」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy