Use single quotes.
error += '<li> this is not the name "....." </li>\n';
Or escape the double quotes.
error += "<li> this is not the name \".....\" </li>\n";
More Related Contents:
- How to Protect website code PHP / JS? [closed]
- Hover over image to get a box with multiple links in html/JavaScript
- How to decode HTML entities using jQuery?
- Can I escape HTML special chars in JavaScript?
- Why does this simple JSFiddle not work?
- HTML5 File API read as text and binary
- Map HTML to JSON [closed]
- className only changing every other class
- How to compare colors in JavaScript?
- How to get html elements from an object tag?
- focus doesn’t work in IE
- Access event to call preventdefault from custom function originating from onclick attribute of tag
- React: how to load and render external html file?
- get a list of all folders in directory [closed]
- How to add background-image using ngStyle (angular2)?
- Is it OK to add your own attributes to HTML elements? [duplicate]
- Change the style of an entire CSS class using javascript
- Scale a div to fit in window but preserve aspect ratio
- How to save data from a form with HTML5 Local Storage?
- HTML5 video, how to detect when there is no audio track?
- Submit form after calling e.preventDefault()
- jQuery in Chrome returns “block” instead of “inline”
- How do I retrieve if the popstate event comes from back or forward actions with the HTML5 pushstate?
- HTML5 Canvas Circle Text
- How to write into a file (in user directory) using JavaScript?
- Getting HTML elements by their attribute names
- NewLine escape character not working
- Refresh element generated by a django template
- Record voice from IPhone using HTML5
- How to highlight a part part of an Input text field in HTML using Javascript or JQuery