Reputation: 4870
I am wondering how to do a simple Javascript log in for my web pages on my dev server. I want it to be very simple, like the ones that pop up when you go to 192.168.1.1 to adjust the settings on your Linksys router.
Any suggestions?
Upvotes: 1
Views: 638
Reputation: 623
AFAIK most of the routers use an HTTP basic authentication that is defined in a .htaccess
file. Just google for "HTTP basic authentication" to find some generators for this.
If you want to go with HTML: is there a problem with a plain form with a text input for the username and a password input for the password?
Upvotes: 1
Reputation: 44078
This isn't JavaScript, it's actually how browsers handle HTTP authentication.
Here's a really basic example in PHP.
Upvotes: 2