Current File : //home/obabain/autoclutchess_obaba_in/NewFile.jsp
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@page import="java.sql.*" %>
     <%@ include file="Connection.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
function items(){
	var a=document.getElementById("id").value;
	var id=[];
	
	id=a.split("_");
	
	var x=document.getElementById("pid");
	var y=document.getElementById("pname");
	x.value=id[0];
	y.value=id[1];
	//alert(id);
}

</script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<form></form>
<table id="mytable">
<tr>
<td>



<select id="name"><option>aaa</option>
<option>bbb</option>
</select>

<input type="text"  >
<input type="text" >
<input type="text" >
<input type="text" ><br>



</td>
</tr>
</table>
<script type="text/javascript">
    $(function () {
        $("#btnClone").bind("click", function () {
 
            var index = $("#mytable select").length + 1;
 
            //Clone the DropDownList
            var ddl = $("#name").clone();
 
            //Set the ID and Name
            ddl.attr("id", "name_" + index);
            ddl.attr("name", "name_" + index);
 
            
 
            //Append to the DIV.
            $("#mytable").append(ddl);
            $("#mytable").append("<br /><br />");
        });
    });
</script>
</body>
</html>