I\'m trying to write a function that reads a inputs value, and determines if a space has been used in it\'s creation. I\'m not trying to trim anything -- just see if it woul
Use contains for include space:
var value = $('#myInputId').val(); if(value.contains(' ')){ console.log("has space"); }
Or you can find with these ascII code   and \xA0
if(value.contains(' ')){ console.log("has space"); }