Skip to content

Commit bff82e0

Browse files
save file
1 parent e7cb750 commit bff82e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

blog/25-07-24/http-server/ex/login-server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@
7575

7676
function error(){
7777

78-
var i = html.login.indexOf('</h4>')+5;
78+
var i = html.login.indexOf('</h4>')+5;
79+
var err = '<p style="color:red">Invalid username or password</p>';
7980
var txt = html.login.slice(0,i)+err+html.login.slice(i+1);
8081
res.writeHead(200,{'content-type':'text/html'});
8182
res.end(txt);

0 commit comments

Comments
 (0)