考慮下面的index.html:如何在HTML中使用鏈接而不是按鈕?
<!-- Product Inventory , 2014 -->
<!--
Inventory management tools are used in many different industries to keep track of products and their quantities.
In this project, we’ll create a simplified version of these tools.
The basic requirements are as follows:
-Store product name, quantity, price, numeric ID and category.
-Search for products by price, ID or name.
-Quick overview of current inventory, including quantities of different products sorted by category.
-Updating the database dynamically as a product is ‘checked out’ or removed from the system.
-->
<%@ page language="java"
contentType="text/html; charset=windows-1256"
pageEncoding="windows-1256"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Product Inventory Shop 2014</title>
<link rel="stylesheet"
href="./css/styles.css"
type="text/css"/>
<link rel="stylesheet"
href="./css/bar.css"
type="text/css"/>
</head>
<div id ="right" class="bar">
<a href="exitTheProgram">GET OUT!</a>
</div>
<body>
<table class="title">
<tr><th>Shop Inventory Program</th></tr>
</table>
<br/>
<fieldset>
<legend>
Welcome ! Please enter your Username and Password
</legend >
<form action="loginPage">
<strong>USERNAME</strong>: <input type="text" name="username"><br>
<strong>PASSWORD</strong> : <input type="password" name="password"><br>
<input type="submit" value="Login">
</form>
<form action="RegisterPage">
<strong> Or click here to <input type="button" value="Register"> </strong>
</form>
</fieldset>
<br/>
<br/>
<br/>
<br/>
<br/><br/><br/><br/><br/><br/>
</body></html>
預覽:
如何使用一個鏈接,而不是註冊框?
含義,我想要鏈接(當鼠標在「註冊」字上時出現的那隻手)並將其轉發給某個Servlet。 (和是的,我知道這是很醜陋,我的工作就可以了... :))
如果你只是想要一個手就可以設置在CSS的'cursor' – Danny