0
Q:

how to check the length of a string in jquery

// How to check the length of input field in jquery
$("selector").val().length
// If '0' is returned, it means input field is empty
2
var string = "string"
string.length
0

New to Communities?

Join the community