Java Reference
In-Depth Information
<input type="text" id="email" />
</td>
<td>
<a id="emailAvailability" href="#">Check Availability</a>
</td>
</tr>
<!-- HTML to be continued later -->
The first column contains text identifiers for the fields. The second column contains the <input/>
elements themselves. Each of these tags has an id attribute: username for the Username field and email
for the Email field. This enables you to easily find the <input/> elements and get the text entered into
them.
The third column contains an <a/> element. These hyperlinks exist for the sole purpose of kicking
off Ajax requests. As such, they have a hash ( # ) in their href attributes, thus preventing the browser
from navigating to a different page (to be considered a valid, clickable hyperlink, an <a/> element
must have an href value). Each of these links has an id attribute that you'll use later in your
JavaScript code.
The remaining three rows in the table contain two password fields and the Submit button (the smart
form currently does not use these fields):
<!-- HTML continued from earlier -->
<tr>
<td class="fieldname">
Password:
</td>
<td>
<input type="text" id="password" />
</td>
<td />
</tr>
<tr>
<td class="fieldname">
Verify Password:
</td>
<td>
<input type="text" id="password2" />
</td>
<td />
</tr>
<tr>
<td colspan="2" class="submit">
<input type="submit" value="Submit" />
</td>
<td />
</tr>
</table>
</form>
The CSS in this HTML page consists of only a couple of CSS rules:
.fieldname {
text-align: right;
Search WWH ::




Custom Search