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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
<?php
$ligne = array(
'ligne 1',
'ligne 2',
'ligne 3',
'ligne 4',
);
?>
<script type="text/javascript">
//<![CDATA[
function $() {
var elements = new Array();
for (var i=0,len=arguments.length;i<len;i++) {
var element = arguments[i];
if (typeof element == 'string') {
var matched = document.getElementById(element);
if (matched) {
elements.push(matched);
} else {
var allels = (document.all) ? document.all : document.getElementsByTagName('*');
var regexp = new RegExp('(^| )'+element+'( |$)');
for (var i=0,len=allels.length;i<len;i++)
if (regexp.test(allels[i].className))
elements.push(allels[i]);
}
if (!elements.length)
elements = document.getElementsByTagName(element);
if (!elements.length) {
elements = new Array();
var allels = (document.all) ? document.all : document.getElementsByTagName('*');
for (var i=0,len=allels.length;i<len;i++)
if (allels[i].getAttribute(element))
elements.push(allels[i]);
}
if (!elements.length) {
var allels = (document.all) ? document.all : document.getElementsByTagName('*');
for (var i=0,len=allels.length;i<len;i++)
if (allels[i].attributes)
for (var j=0,lenn=allels[i].attributes.length;j<lenn;j++)
if (allels[i].attributes[j].specified)
if (allels[i].attributes[j].nodeValue == element)
elements.push(allels[i]);
}
} else
elements.push(element);
}
if (elements.length == 1)
return elements[0];
else
return elements;
}
//]]>
</script>
<script> function f0() { $('d0').value = $('abr').value; } </script>
<script> function f1() { $('d1').value = $('abr').value; } </script>
<script> function f2() { $('d2').value = $('abr').value; } </script>
<script> function f3() { $('d3').value = $('abr').value; } </script>
<script> function f4() { $('d4').value = $('abr').value; } </script>
<table align="center">
<tr><td ><input type="text" id="abr" name="abr" value="Voila le code presque complet" style="border-color:blue; border-style:dotted;" onkeyup="treatquery();" / size="60"></td></tr>
</table>
<table border="2" align="center" width="571" height="6">
<tr><td align="center"><b><?=ACTION?></b><td align="center"><b><?=DESC?></b></td><td align="center"><b><?=QTY?></b></td><td align="center"><b><?=UNIT?></b></td><td align="center"><b><?=TAX?></b></td><td align="center"><b><?=TOTAL?></b></td></tr>
<? for($i=0; $i< 5; $i++){ ?>
<tr>
<td><input type="button" id="myButton" value="Ajouer" onclick="f<?=$i?>();" style="border-color:blue; border-style:dotted;" /></td>
<td>
<input type=text size="50" id="d<?=$i?>" name="d<?=$i?>" value="" style="border-color:rgb(255,102,0); border-style:dotted;"></td>
<td><input type=text size=3 name="n<?=$i?>" value="" onchange="checkNumber(this);subSum(<?=$i?>);" style="border-color:rgb(255,102,0); border-style:dotted;"></td>
<td><input type=text size=6 name="p<?=$i?>" value="" onchange="checkNumber(this);subSum(<?=$i?>);" style="border-color:rgb(255,102,0); border-style:dotted;"></td>
<td><input type=text size=5 name="ta<?=$i?>" value="<?=$taxrate?>" onchange="checkNumber(this);remind(this.value);subSum(<?=$i?>);" style="border-color:rgb(255,102,0); border-style:dotted;"></td>
<td><input type=text size=7 name="to<?=$i?>" value="" onchange="checkNumber(this);subSum(<?=$i?>);redoTotal();" style="border-color:rgb(255,102,255); border-style:dotted;"></td>
</tr></tr>
<? } ?>
</table> |
Partager