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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
| <html>
<head>
<SCRIPT LANGUAGE=JavaScript>
function envoi()
{
Today = new Date;
Jour = Today.getDate();
Mois = (Today.getMonth())+1;
Annee = Today.getFullYear();
+ Jour + "/" + Mois + "/" + Annee;
r=(document.formu.r.value);
n=(document.formu.n.value);
var a=new Array(1);
if
((formu.check1.checked == true)&&(formu.check2.checked == true))
{alert("Ne cocher que une case des degrès!");}
if
((formu.check1.checked == false)&&(formu.check2.checked == false))
{alert("Cocher une case des degrès!");}
for(i=1 ; i<=n ; i++)
if
((formu.check1.checked == false)&&(formu.check2.checked == true))
a.push(prompt("Entrez les degrès de l'angle N° :"+i+"" )*-1)
for(i=1 ; i<=n ; i++)
if
((formu.check1.checked == true)&&(formu.check2.checked == false))
a.push(prompt("Entrez les degrès de l'angle N° :"+i+"" ))
fen=window.open ("","Mults","menubar=no,toolbar=no,location=0,resizable=0, copyhistory=0,directories=0,titlebar=no,status=no,Height=850,left=750,top=200,Width=400,scrollbars=1");
fen.document.write("<table><tr><td width=180><b>"+"</b></td><td width=180 align=right>"+ Jour + "/" + Mois + "/" + Annee+"</td></tr></table>");
fen.document.write("<table><tr><td width=360><u><center>Nombre d'angles = "+n+"</center></u></td></tr></table>");
fen.document.write("<table><tr><td width=360><u><center>Le rayon est de "+r+" mm</center></u></td></tr></table><br>");
for(i=1 ; i<=n ; i++)
{
x=(a[i]*3.141592654)
x=(x/180)
x = Math.sin(x);
var x=(r*x)
var x=Math.round(x*1000)/1000
y=(a[i]*3.141592654)
y=(y/180)
y = Math.cos(y);
var y=(r*y)
var y=Math.round(y*1000)/1000
if
((formu.check1.checked == false)&&(formu.check2.checked == true))
aa=a[i]
if
((formu.check1.checked == false)&&(formu.check2.checked == true))
aa=(aa*-1)
if
((formu.check1.checked == true)&&(formu.check2.checked == false))
aa=a[i]
fen.document.write("<table border=1><tr><td width=200><font SIZE=2>"+"Angles N° "+i+" = "+aa + " degrès: </font></td><td width=80><font SIZE=2>" + " X= " +x+ "</font></td><td width=80><font SIZE=2>" + " Y= "+y+ "</font></td></tr></table>");
}
fen.document.write('<br><table><tr><td width=180><center><A HREF="javascript:window.print()">IMPRIMER</A></center></td>');
fen.document.write("<td width=180><center><INPUT TYPE=\"button\" VALUE=\"Fermer\" ONCLICK=\"self.close()\"></center></td></tr></table>");
fen.document.close();
}
function raz()
{
document.formu.r.value='';
document.formu.n.value='';
document.formu.com.value='';
}
</SCRIPT>
</head>
<body>
<form name="formu">
<table border="0" width="100%">
<tr>
<td width="100%">
<font color=red><center><U><h1>tableaux </h1></U></center></font></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="10%"></td>
<td width="25%"><font size="4" color="black"><input type="checkbox" name="check1" value="1">Sens horaire</font></td>
<td width="65%"></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="10%"></td>
<td width="25%"><font size="4" color="black"><input type="checkbox" name="check2" value="1">Sens anti horaire</font></td>
<td width="65%"></td>
</tr>
</table>
<br>
<br>
<table border="0" width="100%">
<tr>
<td width="10%"></td>
<td width="25%"><font size="4" color="black"><input type=text name="r" size=10>Entrez le rayon du cercle</font></td>
<td width="65%"></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="10%"></td>
<td width="25%"><font size="4" color="black"><input type=text name="n" size=10>Entrez le Nbr d'angles a calculer</font></td>
<td width="65%"></td>
</tr>
</table>
<br>
<br>
<table border="0" width="100%" bgcolor="white">
<tr>
<td width="10%"></td>
<td width="25%"><input type =button onclick="raz();" value="Reset"></td>
<td width="65%"></td>
</tr>
</table>
<table border="0" width="100%" bgcolor="white">
<tr>
<td width="10%"></td>
<td width="25%"><INPUT TYPE=button ONCLICK="envoi( );" VALUE="Calculer"> </td>
<td width="65%"></td>
</tr>
</table>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<table width="100%">
<tr>
<td width="100%"><center><input type=button value=Retour onclick="javascript:history.go(-1)"></center></td>
</tr>
</table>
</form>
</body>
</html> |
Partager