Joining Strings “some text” + “some other text”
Category: Strings + Text
Auto Submit A Form
Very simple method Auto submit from javascript Auto submit from paste or key up
Comma Separated Strings
Convert comma separated string to array Convert array into comma separated string
Converting Strings
Convert Value To String var my_value = 15; var my_string = my_value.toString(); Convert String To Int var my_string = "10"; var my_value = parseInt(my_string);
Making Text Fit A Box
JavaScript
Nested single and double quotes
If you’re using say onclick() and .innerHTML= as part of some inline javascript you may well run into a nested quotes issue. For example, maybe within your .innerHTML=’ you want to give some element an ID – you find you can’t because you need to surround that ID parameter with quotes and you’ve used say […]
Validate text as you type
Good examples https://www.w3schools.com/howto/howto_js_password_validation.asp Remove non permitted characters from an input box as user types