This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Напишите код, который: | |
Запрашивает по очереди значения при помощи prompt и сохраняет их в массиве. | |
Заканчивает ввод, как только посетитель введёт пустую строку, не число или нажмёт «Отмена». | |
При этом ноль 0 не должен заканчивать ввод, это разрешённое число. | |
Выводит сумму всех значений массива | |
---------------------------------------------------------------------------------------------------------------------- | |
var arrNumber = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form> | |
<input type="text" name="company_name" oninvalid="this.setCustomValidity('Your error message')" required /> | |
<input type="submit"> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header class="section header" data-color="dark"> | |
<div class="top_head">fixed</div> | |
</header> | |
<section class="section section-first" data-color="light"></section> | |
<section class="section section-second" data-color="dark"></section> | |
<section class="section section-first" data-color="light"></section> | |
$(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="clockdiv"> | |
<div id="days"> | |
<span class="days"></span> | |
<div class="smalltext">Дней</div> | |
</div> | |
<div id="hours"> | |
<span class="hours"></span> | |
<div class="smalltext">Часов</div> | |
</div> | |
<div id="minutes"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function($) { | |
$.fn.fixMe = function() { | |
return this.each(function() { | |
var $this = $(this), | |
$t_fixed; | |
function init() { | |
$this.wrap('<div class="container-table" />'); | |
$t_fixed = $this.clone(); | |
$t_fixed.find("tbody").remove().end().addClass("fixed").insertBefore($this); | |
resizeFixed(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- HTML --> | |
<div class="file-attach"> | |
<div class="attach-link">Прикрепить файл</div> | |
<div class="file-name">Выберите файл</div> | |
<input type="file" name="attachmentFile"> | |
</div> | |
<!-- CSS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="#elem">About</a> | |
<!------ Some text --------> | |
<div id="elem"></div> | |
<script> | |
$(document).ready(function() { | |
$('a').click( function(){ // ловим клик по ссылке с классом go_to | |
var scroll_el = $(this).attr('href'); // возьмем содержимое атрибута href, должен быть селектором, т.е. например начинаться с # или . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add var | |
var isMobile = { | |
Android: function() { | |
return navigator.userAgent.match(/Android/i); | |
}, | |
BlackBerry: function() { | |
return navigator.userAgent.match(/BlackBerry/i); | |
}, | |
iOS: function() { |