in Education by
i want to add image inside a span here's what i tried (inside a form i added this script): function addSelected(){ var content=" image "; var span = document.getElementById("members"); span.innerHTML=content; } but it always gives me the error: unterminated string literal on this line: var content=" image "; because it's translated by browser to something like (found that by firebug): var content=" image "; this is tested on firefox 8. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Simply add \ before any " in the content string. var content=" image ";

Related questions

0 votes
    y = " \{ Hi\} {0} " print y.format(43) it's showing an error: Key Error: Hi\\ I want to print the output from the above syntax: {Hi} 43 Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
0 votes
    Which of these methods of class String is used to check whether a given object starts with a particular ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    I'm trying to add copyright to an image. If the resolution of image is less than 4592x2576, it ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 9, 2022 in Education by JackTerrance
0 votes
    I'm trying to add copyright to an image. If the resolution of image is less than 4592x2576, it ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    Which is the correct HTML syntax for adding a link to the image? 1. ... xyz.com/image”>...
asked Jul 12, 2021 in Education by JackTerrance
0 votes
    I want to implement in Java a class for handling graph data structures. I have a Node class and ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 27, 2022 in Education by JackTerrance
0 votes
    I have a domain model with an aggregate root: public interface IAggregateRoot { public string Id { get; } ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    What is the literal meaning of ‘Swaraj’. Please answer the above question....
asked Aug 3, 2022 in Education by JackTerrance
0 votes
    An expression involving byte, int, and literal numbers is promoted to which of these? (a) int (b) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    Which of these is long data type literal? (a) 0x99fffL (b) ABCDEFG (c) 0x99fffa (d) 99671246 I ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    A hexadecimal literal begins with __________ (a) 00 (b) 0x (c) 0X (d) Both 0x and 0X The ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of the following is a valid long literal? a) ABH8097 b) L990023 c) 904423 d) 0xnf029L 🔗 ... : stackoverflow.com 🔗Source: Java Interview Questions and Answers...
asked Dec 19, 2020 in Technology by Editorial Staff
0 votes
    The transactions that span across multiple services are handled by ___________. A. DML commands B. Pre-compiled queries C. Logging queries in DBs D. Event driven Architecture...
asked Jan 10, 2023 in Education by JackTerrance
0 votes
    This question already has answers here: How to remove the space between inline/inline-block elements? (41 ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
...