textbox validation accepting Ports in javascript
问题 the question was accepting one or many ports that has one space between them with help of friends, I used this one for my answer but for example if I enter 88888 it will alert me such this thing: 88888NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN is not correct how can I correct this <script type="text/javascript"> function portvalidating(field) { var output=''; m=field.value; if(/^\d{1,5}([ ]\d{1,5})*$/.test(m)) { var parts = m.split(' '); for(i in parts) { var p= parseInt(parts[i]); if(!((0 <= p) &&