▼フォーム要素をクリックすると、入力ヒントがバルーン表示されます。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="ja" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<title>Tooltip for forms | 設置サンプル</title>
<script type="text/javascript" src="/content/lib/form-field-tooltip/js/form-field-tooltip.js"></script>
<script type="text/javascript" src="/content/lib/form-field-tooltip/js/rounded-corners.js"></script>
<link rel="stylesheet" type="text/css" href="/content/lib/global.css" />
<link rel="stylesheet" href="/content/lib/form-field-tooltip/css/form-field-tooltip.css" media="screen,tv" type="text/css" />
<link rel="stylesheet" type="text/css" href="/common/css/example.css"></head>
<body id='example3' class='example'><div class="ads" style="margin:32px auto;text-align:center;"></div><h1 class='h'><a href='/'>PHP & JavaScript Room</a> :: 設置サンプル</h1>
<h3 class='h'>実行結果</h3>
<h1><a href='http://www.dhtmlgoodies.com/index.html?whichScript=form-field-tooltip'>Tooltip for forms - dhtmlgoodies.com</a> | 設置サンプル</h1>
<p>▼フォーム要素をクリックすると、入力ヒントがバルーン表示されます。</p>
<form id="userfrm" action="#" onsubmit="return false;">
<fieldset>
<legend>登録情報</legend>
<table>
<tr>
<th><label for="use_name">名前:</label></th>
<td><input type="text" id="use_name" name="use_name" tooltipText="あなたの「名前」を入力してください" size="20" maxlength="256" /></td>
</tr>
<tr>
<th><label for="user_name_kana">名前のフリガナ:</label></th>
<td><input type="text" id="user_name_kana" name="user_name_kana" tooltipText="あなたの「名前のフリガナ」を入力してください" size="20" maxlength="256" /></td>
</tr>
<tr>
<th><label for="address">住所:</label></th>
<td><textarea id="address" name="address" cols="50" rows="3" tooltipText="あなたの「住所」を入力してください"></textarea></td>
</tr>
<tr>
<th><label for="sex">性別:</label></th>
<td>
<label for="sex_1"><input type="radio" id="sex_1" name="sex_1" value="male" toolTipText="あなたの「性別」を選択してください" /> 男性</label>
<label for="sex_2"><input type="radio" id="sex_2" name="sex_2" value="female" toolTipText="あなたの「性別」を選択してください" /> 女性</label>
</td>
</tr>
<tr>
<th><label for="job">職業:</label></th>
<td>
<select id="job" name="job" tooltipText="あなたの職業を選択してください">
<option value="" selected="selected">▼選択してください</option>
<option>自営業</option>
<option>会社員</option>
<option>公務員</option>
<option>パート・アルバイト</option>
<option>専業主婦</option>
<option>学生</option>
<option>その他</option>
</select>
</td>
</tr>
</table>
<p>
<input type="submit" value="送信" class="btn" tooltipText="テストのため、「送信」ボタンをクリックしても送信されません" />
</p>
</fieldset>
</form>
<script type="text/javascript">
var tooltipObj = new DHTMLgoodies_formTooltip();
tooltipObj.setTooltipPosition('right');
tooltipObj.setPageBgColor('#EEEEEE');
tooltipObj.setTooltipCornerSize(10);
tooltipObj.initFormFieldTooltip();
</script>
</body>
</html>