How to write this code in JQuery?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
16 views
Hi All, would look like this kad Js to Jquery?
function validateForm() { var x = document.forms["myForm"]["log"].value; var y = document.forms["myForm"]["pass"].value; if (x == " || y == ") { document.getElementById("demo").innerHTML = "Hello Dolly."; return false; } }
by | 16 views

1 Answer

0 like 0 dislike
Something like that (if absolutely literally and do not simplify):
function validateForm() { var x = $('#myForm #log').val(); var y = $('#myForm #pass').val(); if (x == "" || y == "") { $('#demo').html('Hello Dolly.'); return false; } }
by

Related questions

0 like 0 dislike
1 answer
asked May 22, 2019 by ganjo888
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users