Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
    Bookmark Topic Watch Topic
  • New Topic

what is the equivalent code on jsp?

 
Myel Gregory
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
i have a javascript code i want it on jsp can someone help me? my code is

var user = document.getElementById("username").value;

var pw1 = document.getElementById("password").value;
var pw2 = document.getElementById("password2").value;

if (user == '' || pw1 == '') {
document.getElementById("username").value = 'Please enter a username.';
document.getElementById("test").style.visibility = 'hidden';
document.getElementById("username").style.visibility = 'visible';
document.getElementById("test2").value = 'Please enter a password.';
document.getElementById("test2").style.visibility = 'visible';
return false;
}
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question more than once.
 
    Bookmark Topic Watch Topic
  • New Topic