i have this code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                    "http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js";></script>

  <script>
  $(document).ready(function(){

    $("button").click(function () {
      var text = $(this).val();
      $("input").val(text);
    });
  });
  </script>
  <style>
  button { margin:4px; cursor:pointer; }
  input { margin:4px; color:blue; }
  </style>
</head>
<body>
  <div>
    <button value='feed00000'>feed</button>
    <button value='feed11111'>the</button>
    <button value='feed22222'>Input</button>
  </div>
  <input type="text" value="click a button" />
</body>
</html>

when i click the button"feed", it feedback"feed00000" in FireFox, but
"feed" in IE.
my question is:
1. do you know why?
2. how to make sure to get only "feed00000" either in IE or FireFox?

thanks!

Reply via email to