Font size
WorksheetsJQuery test rus
Total questions: 10
Worksheet time: 15mins
Анализируя код, отметьте все верные утверждения
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="jquery-3.5.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<title>Exemplu de JQuery</title>
<style>
div {
border:2px solid;
margin:10px;
padding:10px;
border-radius:15px;
font-size:30px;
text-align:center;
background-color:lightblue;
}
</style>
<script>
$(document).ready(function(){
$("button").click(function(){
$("div").animate({height:300},"slow");
$("div").animate({width:300},"slow");
$("div").animate({height:100},"slow");
$("div").animate({width:100},"slow");
});
});
</script>
</head>
<body>
<div>DIV ce va fi animat</div>
<button>Fa un click</button>
</body>
</html>
В данном коде событие - button
В данном коде событие - ready
В данном коде событие - animate
В данном коде событие - click
В данном коде событие - slow
Анализируя код, отметьте все верные утверждения
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="jquery-3.5.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<title>Exemplu de JQuery</title>
<style>
div {
border:2px solid;
margin:10px;
padding:10px;
border-radius:15px;
font-size:30px;
text-align:center;
background-color:lightblue;
}
</style>
<script>
$(document).ready(function(){
$("button").click(function(){
$("div").animate({height:300},"slow");
$("div").animate({width:300},"slow");
$("div").animate({height:100},"slow");
$("div").animate({width:100},"slow");
});
});
</script>
</head>
<body>
<div>DIV ce va fi animat</div>
<button>Fa un click</button>
</body>
</html>
В данном коде селектор - button
В данном коде селектор - div
В данном коде селектор - document
В данном коде селектор - animate
Анализируя код, отметьте все верные утверждения
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="jquery-3.5.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<title>Exemplu de JQuery</title>
<script>
$(document).ready(function(){
$("input").focus(function(){
$(this).css("background-color","#cccccc");
});
$("input").blur(function(){
$(this).css("background-color","#55aa00");
});
});
</script>
</head>
<body>
Name: <input type="text" name="fullname"><br>
Email: <input type="text" name="email">
</body>
</html>
В данном коде событие - blur
В данном коде событие - ready
В данном коде событие - css
В данном коде событие - focus
В данном коде событие - this
Анализируя код, отметьте все верные утверждения
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="jquery-3.5.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<title>Exemplu de JQuery</title>
<script>
$(document).ready(function(){
$("input").focus(function(){
$(this).css("background-color","#cccccc");
});
$("input").blur(function(){
$(this).css("background-color","#55aa00");
});
});
</script>
</head>
<body>
Name: <input type="text" name="fullname"><br>
Email: <input type="text" name="email">
</body>
</html>
В данном коде селектор - name
В данном коде селектор - background-color
В данном коде селектор - input
В данном коде селектор - body
Анализируя код, отметьте все верные утверждения
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="jquery-3.5.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<title>Exemplu de JQuery</title>
<script>
$(document).ready(function(){
$("input").focus(function(){
$(this).css("background-color","#cccccc");
});
$("input").blur(function(){
$(this).css("background-color","#55aa00");
});
});
</script>
</head>
<body>
Name: <input type="text" name="fullname"><br>
Email: <input type="text" name="email">
</body>
</html>
В данном коде this означает элемент blur
В данном коде this означает элемент document
В данном коде this означает элемент input
В данном коде this означает элемент body
Анализируя код, отметьте все верные утверждения
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="jquery-3.5.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<title>Exemplu de JQuery</title>
<script>
$(document).ready(function(){
$("html").hover(function(){
$("tr:even").css("background-color","white");
$("tr:odd").css("background-color","yellow");
},function(){
$("tr:even").css("background-color","yellow");
$("tr:odd").css("background-color","white");
});
});
</script>
</head>
<body>
<h1>Welcome to My Web Page</h1>
<table border="1">
<tr>
<th>grupa MI-121</th>
</tr>
<tr>
<td>Arciuc Victor</td>
</tr>
<tr>
<td>Ceban Octavian</td>
</tr>
<tr>
<td>Ciobanu Vladimir</td>
</tr>
<tr>
<td>Ciorba Radu</td>
</tr>
<tr>
<td>Coceban Vlad</td>
</tr>
</table>
</body>
</html>
В данном коде событие - even
В данном коде событие - ready
В данном коде событие - click
В данном коде событие - hover
В данном коде событие - css
Анализируя код, отметьте все верные утверждения
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="jquery-3.5.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<title>Exemplu de JQuery</title>
<script>
$(document).ready(function(){
$("html").hover(function(){
$("tr:even").css("background-color","white");
$("tr:odd").css("background-color","yellow");
},function(){
$("tr:even").css("background-color","yellow");
$("tr:odd").css("background-color","white");
});
});
</script>
</head>
<body>
<h1>Welcome to My Web Page</h1>
<table border="1">
<tr>
<th>grupa MI-121</th>
</tr>
<tr>
<td>Arciuc Victor</td>
</tr>
<tr>
<td>Ceban Octavian</td>
</tr>
<tr>
<td>Ciobanu Vladimir</td>
</tr>
<tr>
<td>Ciorba Radu</td>
</tr>
<tr>
<td>Coceban Vlad</td>
</tr>
</table>
</body>
</html>
В данном коде скрипт манипулирует элементом tr
В данном коде скрипт манипулирует элементом html
В данном коде скрипт манипулирует элементом td
Анализируя код, отметьте все верные утверждения
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("img").mousedown(function(){
$("img").attr("src", "purple-dress_b.jpg");
$("p").attr("style", "position:fixed;top:10px;left:250px;z-index:+1;background-color:white;border-radius:15px;box-shadow:10px 10px 5px #888888;padding:25px;border:3px;font-size:20px;");
$("p").html("<b>Hey, do not touch me!!</b>");
});
});
</script>
</head>
<body>
<img src="purple-dress_f.jpg" width="250" height="450" />
<p style="position:fixed;top:10px;left:250px;"> </p>
</body>
</html>
В данном коде событие - src
В данном коде событие - ready
В данном коде событие - click
В данном коде событие - mousedown
Анализируя код, отметьте все верные утверждения
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("img").mousedown(function(){
$("img").attr("src", "purple-dress_b.jpg");
$("p").attr("style", "position:fixed;top:10px;left:250px;z-index:+1;background-color:white;border-radius:15px;box-shadow:10px 10px 5px #888888;padding:25px;border:3px;font-size:20px;");
$("p").html("<b>Hey, do not touch me!!</b>");
});
});
</script>
</head>
<body>
<img src="purple-dress_f.jpg" width="250" height="450" />
<p style="position:fixed;top:10px;left:250px;"> </p>
</body>
</html>
В данном коде селектор - img
В данном коде селектор - src
В данном коде селектор - document
В данном коде селектор - p
Анализируя код, отметьте все верные утверждения
<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>Exemplu de FORMULAR</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="jquery-3.5.1.min.js"></script>
<script>
var s = [ "Parola trebuie sa contina litere si cifre", "Parola trebuie sa contina litere mici si mari", "Parola trebuie sa contina simboluri speciale", "Parola trebuie sa contina nu mai putin de 8 caractere", "Caracterele in parola nu trebuie sa se repete", "Nu utilizati aceiasi parola la cteva accounte", "Simbolurile in parola trebuie sa fie amestecate" ];
$(document).ready(function(){
i=0;
$("input:radio[name=raspuns]").change(function() {
x=$("input:radio[name=raspuns]:checked").val();
y=$("input:radio[name=raspuns]:checked").index();
$("#content2").text(x);
$("#content2").animate({
left:'350px',
});
if (y<2) {
$("#casatorit").prop({ "disabled":true });
$("#necasatorit").prop({ "disabled":true });
}
else {
$("#casatorit").prop({ "disabled":false });
$("#necasatorit").prop({ "disabled":false });
};
});
});
</script>
<style>
input[type=radio] {display:block;}
</style>
</HEAD>
<BODY>
<div>
<h3> Exemplu de formular</h3>
<form name="myform" >
<p> <input id="exemplu1" type="text" value="Camp de editare" size="25" maxlength="30"/>
<span id="content"> </span></p>
<p> <input id="exemplu2" type="password" value="Parola" size="15" maxlength="15"/>
<span> </span></p>
<p>Întroduceţi vîrsta:<br/>
<input type="radio" name="raspuns" value="15" checked="checked" onClick="writeRadio('sub 15')">sub 15 ani
<input type="radio" name="raspuns" value="15-20" >15-20 ani
<input type="radio" name="raspuns" value="20-25" >20-25 ani
<input type="radio" name="raspuns" value="25-35">25-35 ani
<input type="radio" name="raspuns" value="35-45">35-45 ani
<input type="radio" name="raspuns" value="45" >peste 45 ani
<span id="content2" style="font-size:20px;position:absolute;"> </span>
</p>
<p>Ești casatorit(ă)?<br/>
<input type="checkbox" id="casatorit" >Da<br/>
<input type="checkbox" id="necasatorit">Nu<br/>
</p>
</form>
</div>
</BODY>
</HTML>
В данном коде событие - click
В данном коде событие - change
В данном коде событие - ready
В данном коде событие - animate
