How to determine the parameters can only be obtained for digital JSP,

For example, 1.jsp? Id=aaa, get the value of ID in 1.jsp, and then determine the only digital, what Form do not Oh, just get the parameters in the address bar. ^.^

Started by Winnie at November 14, 2016 - 7:36 AM

You said the figures refer to int float
Or two can be?

What is the judgment of Java or JS?

Posted by Alston at November 18, 2016 - 7:46 AM

The JS judge before submission

Posted by Maurice at November 28, 2016 - 8:41 AM

var params =;

var id = params.split("=")[1];

if (new RegExp("[0-9]+").test(id)){
     alert("Is the number of!");
     alert("Parameter is the only digital!");
     return false ;

Posted by Ellie at December 03, 2016 - 9:15 AM