How to insure that number type int or double was insert in html5 with regular expression

<!DOCTYPE html>
<html>
<body>

<h1>how to insure that number type int or double was insert in html5</h1>

<form >
<!–i explain the pattern : \d meaning number
+ meaning at least one
()? meaning what’s inside is optional
\. meaning dot (if i write only . it’s mean it can get any letter)
–>
Int or Double number: <input type=”text” pattern=”\d+(\.\d)?” title=”this not int or double”>
<input type=”submit”>
</form>
</body>
</html>

Advertisements
This entry was posted in כללי and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s