-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascript.js
More file actions
154 lines (115 loc) · 2.98 KB
/
javascript.js
File metadata and controls
154 lines (115 loc) · 2.98 KB
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
<!--
//var x = 10 ;
//{
//if(x==10){document.getElementById("mes").innerHTML="hello student var x = 10 " ; }
//if(x==20){document.getElementById("mes").innerHTML="hello student var x = 20" ;}
//}
//x=prompt("ادخل المعدل ") ;
//x=parseInt(x);
-->
function fun()
{
x=f1.z.value;
if(x>=90)
document.getElementById("p2").innerHTML +="ممتاز";
else if (x>=80)
document.getElementById("p2").innerHTML +="جيدجدا";
else if (x>=70)
document.getElementById("p2").innerHTML +="جيد";
else if (x>=60)
document.getElementById("p2").innerHTML +="مقبول";
else if (x>=50)
document.getElementById("p2").innerHTML ="ضعيف";
else
document.getElementById("p2").innerHTML ="راسب";
}
/*
function fun1()
{
x=window.confirm("هل انت متاكد من الحذف ")
if(x==true)
fun()
}
*/
function Calculator()
{
x=parseInt(document.f2.num1.value);
y=parseInt(document.f2.num2.value);
operation = document.f2.op.value;
switch(operation)
{
case'+':z=x+y;break;
case'-':z=x-y;break;
case'/':z=x/y;break;
case'*':z=x*y;break;
}
document.getElementById("g").innerHTML +=z;
}
function forr()
{
document.getElementById("ValueFor").innerHTML="";
for (i=1 ;i<10;i++)
document.getElementById("ValueFor").innerHTML+=i;
}
function whilee()
{
i=1
while (i<=10) {
document.getElementById("ValueWhile").innerHTML+=i;
i++
}
}
function DoWhile()
{
i=1;
do{
document.getElementById("ValueDo").innerHTML+=i;
i++;
}
while (i<=10) ;
}
function arry() {
x=[]
n=prompt("ادخل عدد المصفوفه" )
n=parseInt(n);
for(i=1;i<=n;i++)
{
k =prompt("ادخل قيم المصفوفه")
x[i]= parseInt(k)
}
document.getElementById("Lope").innerHTML+=x;
}
function checkuser()
{
username =document.f11.username.value;
pass =document.f11.pass.value;
if(username=="ali"&& pass=="123")
window.open("https://www.google.com")
else
if(username=="sultan" && pass=="123")
window.open("https://www.salhowaymel.info")
}
function resetImg(x)
{
x.style.width="200"
x.style.height="200"
}
function bigImg(x) {
x.style.width="150"
x.style.height="150"
}
function o(x) {
x.src="css.png"
}
function chingeImg(y) {
imgN= Math.round(10*Math.random(),0)+1;
url=""+imgN+ ".png";
y.src=url;
}
function array1(){
//x=[1,2,5,6,8,66,10];
m=prompt("ادخل الاسم الذسي تريد اضافتة في المصفوفه");
stname=[sultan, abdullah,mohamad,kaled];
stname.push(m);
document.getElementById("newarray")innerHTML =stname;
}