1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<script type="text/javascript">
function AddRow(){
var newRow = document.getElementById('table').insertRow(1);
var newCell = newRow.insertCell(0);
newCell.innerHTML = '<select name="operation">
<option value=1> Création </option>
<option value=2> Suppression </option>';
newCell = newRow.insertCell(1);
newCell.innerHTML = '<select name="matiere">
<option value=1> PE </option>
<option value=2> Acier </option>
<option value=3> Fonte grise </option>
<option value=4> Fonte ductile </option>
<option value=5> Plomb </option>';
newCell = newRow.insertCell(2);
newCell.innerHTML = '<select name="pression">
<option value=1> MPB </option>
<option value=2> BP </option>
<option value=3> MPC </option>';
newCell = newRow.insertCell(3);
newCell.innerHTML = '<input type="text" name="calibre" size="3" maxlength="3">';
newCell = newRow.insertCell(4);
newCell.innerHTML = '<input type="text" name="annee" size="4" maxlength="4">';
newCell = newRow.insertCell(5);
newCell.innerHTML = '<input type="text" name="longueur">';
newCell = newRow.insertCell(6);
newCell.innerHTML = '<select name="nature">
<option value=1> Gaz naturel </option>
<option value=2> Air </option>
<option value=3> Propane </option>';
}
</script>
<body bgcolor="#FFFFFF" text="#000000">
<table id="table">
<tr>
<td> Opération </td>
<td> Matière </td>
<td> Pression </td>
<td> Calibre </td>
<td> Année </td>
<td> Longueur GDO </td>
<td> Nature </td>
</tr>
<tr>
<td><input type="button" value="Ajouter une ligne" onClick="AddRow()" ></td>
</tr>
</table>
</body>
</html> |
Partager