Skip to content
Advertisement

Opening a .html with window.location

I’m writing a simple login page in Ajax + Jquery I have an error when I click on the button. And I don’t understand why.

Uncaught SyntaxError: Unexpected end of input

At this line echo '<input type="button" value="connexion" OnClick="window.location.assign("http://localhost/loginmap/members/success.html")>';

There is my code

JavaScript

Advertisement

Answer

JavaScript

It’s cause you wrote quote character.

You can use this way as well.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement