skij
asked on
HTML/JavaScript/jQuery: Should Entities be Used for Dynamically Added Content?
I understand that when coding HTML, this:
<a href="Link?a=1&b=2& ;c=3">Link </a>
is better than this:
<a href="Link?a=1&b=2&c=3">Li nk</a>
What about when the content is added dynamically, for example using AJAX?
<a href="Link?a=1&b=2&
is better than this:
<a href="Link?a=1&b=2&c=3">Li
What about when the content is added dynamically, for example using AJAX?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Demo</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('div').append('<a href="Link?a=1&b=2&c=3">Link</a>')
$('div').append('<a href="Link?a=1&b=2&c=3">Link</a>')
});
</script>
</head>
<body>
<div>
</div>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.