When I use jQuery to add an <input>, the new input's value gets copied to the page's preexisting input, whenever the page is refreshed!
Run this page in Firefox:
<!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>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="Scripts/jquery-1.8.0.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('<input />').attr({ 'type': 'text' }).val(2).appendTo($('#cart'));
})
</script>
</head>
<body>
<div id="cart">
</div>
<input type="text" id="afe" />
</body>
</html>
When it first loads, the original input will be blank and the input added by jQuery will have a value of 2.
Now press F5. Both inputs will show the value 2!
What's going on?

