Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form method="" action="">
<input type="text" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" />
</form>
</body>
</html>
Сигурен ли си?dashe каза:echo'<input type='text' onkeyup='javascript:this.value=this.value.replace(/[^0-9]/g, '');' />';
Пак не би проработилоdashe каза:echo "<input type='text' onkeyup='javascript:this.value=this.value.replace(/[^0-9]/g, '');' />";
echo "<input type="text" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" />";
raiden каза:Пак не би проработилоdashe каза:echo "<input type='text' onkeyup='javascript:this.value=this.value.replace(/[^0-9]/g, '');' />";
Така няма как да откаже :?:Код:echo "<input type="text" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" />";
echo "<form action="" method="POST">";
echo "<input type="text" onkeyup="javascript:this.value=this.value.replace(/[^0-9]/g, '');" />";
echo "<input type="submit" name="button" value="Направи нещото"></td></tr>";
</form>
if ($_POST[button]) {
$text=htmlspecialchars($_POST[text]);
if (text == [0-9]) {
echo "Успешно нещо си";
}else{
echo "Не успешно нещо";
}
}
if (is_numeric($text))
{
echo "Успешно";
}
else {
echo "Позволено е да се ползват само цифри !";
}