<body>
<%
out.println(" UserName:<input type=\"text\" id=\"s1\" size=\"10\" name=\"s1 \" > ");
out.println("Password:<input type=\"password\" id=\"s2\" size=\"10\" name=\"s2\" >");
out.println("<button onclick=\"Myfunction()\">Submit</button>");
%>
</body>
This is my Jsp page,when i goes to Password tab ,it has to show mandatory symbol * and text box beside username that field is mandadtory. How can i do this ,anybody guide me please,thanks for your help?