inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,781
January 2015
msg
|
Post by Lynx on May 4, 2018 17:12:30 GMT -8
One quick, terminology question. Are what's between the single quotes referred to as attributes and what's between double quotes referred to as definitions? None. The reason for using the 2 different ones is so you can have a quote within the quote, so to speak. You could also escape the quotes as well, if you wanted to stick with one kind of quote. For example, this line: noticeBox += "<td><img src='http://storage.proboards.com/6303556/images/RGSZLuwljrEsfTNEVDuA.png' style='padding-right: 10px;'></td>";
could have also been written like this (notice that the "inside" quotes have a \ before them): noticeBox += "<td><img src=\"http://storage.proboards.com/6303556/images/RGSZLuwljrEsfTNEVDuA.png\" style=\"padding-right: 10px;\"></td>";
If the "inside" quotes were not escaped, or as apostrophes (or quotes if using apostrophes for the "outside"), then the line would read to: noticeBox += "<td><img src="
because that "inside" quote closed the string prematurely. Does that help explain that?
|
|
inherit
252032
0
Apr 26, 2024 23:51:41 GMT -8
Retread
Tribbial Pursuit.
5,014
January 2018
retread
|
Post by Retread on May 4, 2018 18:14:06 GMT -8
Does that help explain that? I believe it does. I'll make a few statements. Tell me if these are true. " and ' and \" are functionally equivalent but each one can only be closed by the identical. \" is correct. "\ is incorrect. /" is incorrect. \ " is incorrect. (space between) EDIT: Since I received a like from Mentor-Supreme G I can safely assume my statements were correct. All goals and additional information are now complete. We can tie a ribbon on this one and I'll exit with my deepest thanks to all.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,781
January 2015
msg
|
Post by Lynx on May 5, 2018 9:20:42 GMT -8
Sorry, Retread. I had done a quick login and didn't really have time to post a reply - but gave your post a like to let you know I had seen it. In addition to what you mentioned above, think of them like HTML tags - the first one opened should be the last one closed.
|
|