This file contains hidden or 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> | |
<h2>Элементы форм</h2> | |
<fieldset> | |
<legend>Input</legend> | |
<h3>Текстовое поле ввода</h3> | |
<p><input type="text" name="" id="" value="Иван"></p> | |
<h3>Выключатель</h3> | |
<p><input type="checkbox" name="" id="c1"> <label for="c1">Отметить</label></p> |
This file contains hidden or 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
<?php | |
/** | |
* @author Mikhail Baranov <[email protected]> | |
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License | |
* @package block | |
* @subpackage vcard | |
* | |
* Block: simple html vcard presentation | |
* | |
*/ |
This file contains hidden or 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
<!-- | |
* Метод document.getElementsByTagName() | |
--> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
function getElements() { | |
var x=document.getElementsByTagName("input"); | |
console.log(x.length); |
This file contains hidden or 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><head> | |
<title>Обработка заказа</title> | |
</head> | |
<body> | |
<h2>Обработка заказа</h2> | |
<?php | |
define("TYREPRICE", 100); | |
define("OILPRICE", 10); |
This file contains hidden or 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-атрибутов | |
function proverka(input) | |
{ | |
input.value = input.value.replace(/[^\d,]/g, ''); | |
}; // Здесь точка с запятой не нужна | |
function checklen(x,y) | |
{ |
This file contains hidden or 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 setFocus(){ | |
document.getElementsByName("num-1")[0].focus(); | |
} | |
function checkNum(x){ | |
var f = document.getElementsByTagName("form")[0]; | |
//Проверяем значение, число или нет | |
if (isNaN(x.value)) { |
This file contains hidden or 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-атрибутов | |
function checkNum(x) { | |
var n = document.getElementsByTagName("form")[0]; | |
if (isNaN(x.value)) { | |
// в результате, если я ввож 139o (промахнулся по 0), | |
// то стирается всё значение. Это нехорошо |
This file contains hidden or 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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
div { | |
width: 400px; | |
border-radius: 10px; | |
min-height: 200px; | |
padding: 10px; | |
background: #999; |
This file contains hidden or 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 { | |
background: #F00; | |
} | |
.first-wrapper { | |
outline: solid 3px #009; | |
background: #FFF; | |
} | |
.first { | |
position: absolute; |
This file contains hidden or 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
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<?php | |
require_once('db.inc.php'); |