hi there i wanted to put this:
document.write("y = " + i);
inside another variable, like this:
s=s+"\"y = \" \+ i";
but now, i variable is not variable, just a plain text.
how can i fix this? output would be
document.getElementById("output").innerHTML=s;
thank you
You do not pass to s
string a variable - just text i
. Try with:
s=s+"y = " + i;
You can also convert it to:
s += "y = " + i;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.