Search the Community
Showing results for tags 'symbols'.
-
Hi all - I have searched the forums, tutorials and the web and I cannot find a good answer to this. I find plenty of HTML code for many math symbols, but I am specifically looking for one pictured (the long line) Thanks in advance for any help!
-
Hello, I am pretty new to JavaScript, but I am working on a project. Currently I have to find a way to determ if a postalcode is an correct postal code. (A dutch postal code) For that I will have to confirm if two correct letters are entered in the form.I think my explanation is really unclear, so I will try to make it more clear for everyone. The postal codes in The Netherlands look like this: 1234 AB. In one place, e.g. Amsterdam, they use the letters "AA, AB, AC, AD, AG, AH, AJ" etc. The script has to look for one of those letters with the correct combination (AA, AB, AC, AD, etc). If I enter a different combination (e.g BA), it should give me the alert "This postal code is incorrect". I have absolutely no idea how to do this, and googling didn't do much as I do not know the keywords I have to look for. Here is an example of my current, not working, script: var postalcodes = /(AA|AB|AC||AE||AH|AK|AL|AM|AN|AP|AR|AS|AT|AV|AW|AX|AZ|BA|BB|BC)/g;var a=document.forms["form"]["postcode"].value; if(a.match(postalcodes)) { alert("Correct!"); return false; // Just doing return false to test the code } I also tried "a.Search()", didn't work neither. Do you guys have any idea how I can do this?
- 15 replies
-
- find texts
- strings
-
(and 2 more)
Tagged with: