Jump to content

PHP: only number

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
usmanzm

usmanzm

    Newbie

  • Members
  • Pip
  • 5 posts
<html>
<head>
<title>PHP dan JavaScript</title>
<script language="JavaScript">
function onlyNumbers(evt){
var e = event || evt;
var charCode = e.which || e.keyCode;

if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;

return true;

}
</script>
</head>
<body>
Masukan No Telepon : <br>
<input type="text" onkeypress="return onlyNumbers();">
</body>
</html>

#2
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Are these all tutorials?
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#3
chili5

chili5

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 7,247 posts
Hm, it doesn't work in Firefox. Doesn't use PHP at all. lol

Hm, what's the point?