javascript - Is it possible to add this line "as is" in HTML markup? -
is possible add javascript , json expressions "as is" in html markup?
contrate > 50 && salinc <= 50 || retage >= 50  { "contrate": 0, "salinc": 0, "marstatus": "single", "spousedob": "1970-01-01" } so can load xmldocument .net object?
it (html tag attribute, html tag content...), have part of html , xml-valid.
you can stash text inside <script> tags explicitly marked not being javascript:
<script id="expression" type="text/not-javascript"> contrate > 50 && salinc <= 50 || retage >= 50 </script>  <script id="stash" type="text/not-javascript"> { "contrate": 0, "salinc": 0, "marstatus": "single", "spousedob": "1970-01-01" } </script> you can find <script> element id , use innerhtml extract contents.
the browser won't pay attention content, other string </script>, avoid that.