"+17024181234") and javascript file Recommended Usage. You can also do that just with regexes and without any array operation: vog's answer is really close to the 100% accurate answer to the question (except needs to strip the extension.) How to prevent super-strong slaves from escaping&rebelling. You can do similar without expando properties by using a javascript variable. This is the simplest and best solution. Asking for help, clarification, or responding to other answers. input IF you need to listen forms 'change' or 'input' event and you change inputs value via JS - you can name your custom event 'change' \ 'input' and it will work too. This article contains the following sections: If you ask users to enter information in a page for example, into a form it's important to make sure that the values that they enter are valid. @ppumkin your comment makes no sense. This will keep the select in the data (as it's not disabled) and only the option that are not selected are disabled, therefore not selectable. input Making statements based on opinion; back them up with references or personal experience. If you have a CSRF validation (like in symfony and many other frameworks), it won't work. actually I need reflect external change so that not helping me . Sometimes we need to set a default value of the element, This example explains methods to do so. second you have multiple elements with the same id(