Մասնագիտական ուսուցում նախագիծ. 27.04.20 — 01.05.20

<!DOCTYPE html>
<html>
<head>
<title>Java</title>
<meta charset = “utf-8”>
</head>
<body>
<div style = “background:#0ff; font-size: 22px;”>
<script>
/*
var date = new Date();
var text = “year = ” + date.getFullYear();
text += “\nmonth = ” + date.getMonth();
text += “\nday = ” + date.getDate();
text += “\nhour = ” + date.getHours();
text += “\nminute = ” + date.getMinutes();
text += “\nsecond = ” + date.getSeconds();
alert(text); */

var date = new Date(2000, 3, 5, 17, 23, 26);
var text = “year = ” + date.getFullYear();
text += “\nmonth = ” + date.getMonth();
text += “\nday = ” + date.getDate();
text += “\nhour = ” + date.getHours();
text += “\nminute = ” + date.getMinutes();
text += “\nsecond = ” + date.getSeconds();
alert(text);

</script>
</div>
</body>
</html>

<!DOCTYPE html>
<html>
<head>
<title>JavaScript</title>
<meta charset = “utf-8”>
</head>
<body onload= “timer()”>
<div style = “background:#0ff; font-size: 22px;”>
<script>
/*
var id=setInterval(“my_func()”, 2000);
var counter = 0;
function my_func() {
counter++;
alert(“second passed – ” + counter);
if (counter==3)
clearInterval(id);
} */

var id=setInterval(“my_func()”, 1000);
var counter = 0;

function timer() {
counter++;
document.getElementById(“count”).innerHTML=counter;
setTimeout(“timer()”, 1000);
}

// Տնային առաջադրանք

/*
var date = new Date();
var text;
text += “\nhour = ” + date.getHours();
text += “\nminute = ” + date.getMinutes();
text += “\nsecond = ” + date.getSeconds();
alert(text);
*/
</script>
</div>
Second passed <span id = “count”> -1 </span>
</body>
</html>

Ծրագրավորում ապրիլ 6-10

<!DOCTYPE html>
<html>
<head>
<title>JavaScript</title>
<meta charset = «utf-8»>
</head>
<body>
<div>
<script>

var answer = «patasxan»;
var answer1 = answer.toLowerCase();
var a;
a = prompt(«harc»);
if (a==answer || a==answer1){
a += «\n Lower = » + answer.toLowerCase();
alert(«chishta»)
}
else {
alert(«sxala»)
}
</script>
</div>
</body>
</html>

Java script 7

<!DOCTYPE html>
<html lang=»en»>
<head>
<meta charset=»UTF-8″>
<title>Document</title>
</head>
<body>
<div>
<script type=»text/javascript»>
var string;
string = prompt(«string»)
var text = «length = » + string.length;
if (string.length > 10){
alert(«սիմվոլների քանակը մեծ է 10-ից»)
}
else if(string.length < 10){
alert(«սիմվոլների քանակը փոքր է 10-ից»)
}
alert(text);

</script>
</div>
</body>
</html>

Java script 5

<!DOCTYPE html>
<html lang=»en»>
<head>
<meta charset=»UTF-8″>
<title>Document</title>
</head>
<body>
<div>
<script type=»text/javascript»>
var anun;
anun = prompt(«Անուն»);
var azganun;
azganun = prompt(«Ազգանուն»);
var hayranun;
hayranun = prompt(«Հայրանուն»);

var fio = anun + » » + azganun + » » + hayranun;
alert(fio);

</script>
</div>
</body>
</html>

Java script 4

<!DOCTYPE html>
<html lang=»en»>
<head>
<meta charset=»UTF-8″>
<title>document</title>
</head>
<body>

<div>
<script>
var number;
number = prompt(number);
function print (text){
document.write(text);
}
function count(x){
number = x * x * x;
}
count(number);
print(«<br> number = » + » » + number);
</script>
</div>

</body>
</html>