[jQuery] clone form information
sometimes we have two form that almost the same fields, so we will
give client a clone button if the information is complete the same,
this is how I do now, is there any easy way to accomplish that?
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>clone form</title>
<style type="text/css">
<!--
body {
font-size: 12px;
}
div.box {
width: 500px;
border: 1px solid #000000;
padding: 6px;
margin: 0 0 6px 0;
}
-->
</style>
<script type="text/javascript" src="js/jquery-1.3.1.js"></script>
</head>
<body>
<div class="box">
<form method="post" name="form1" id="form1">
<label for="name">name</label>
<input name="name" type="text" id="name" value="David" />
<br />
<label>
<input name="gender" type="radio" id="gender_0" value="1"
checked="checked" />
male</label>
<br />
<label>
<input type="radio" name="gender" value="0" id="gender_1" /