Skip to main content

Bug Tracker

Side navigation

Ticket #3917: test-3917.html
File test-3917.html, 0.6 KB (added by dmethvin, January 20, 2009 12:20AM UTC)

maxLength property vs. attribute

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <script src="jquery-1.3.js"></script>
  
  <script>
  $(document).ready(function(){
  
$("input").each(function() {
  $(this).after(
	" maxlength: "+this.maxLength+" "+$(this).attr("maxLength")+" "+this.getAttribute("maxLength")
  );
});

  });
  </script>
  <style>

  </style>
</head>
<body>

<input type="text" name="text1">
<br />
<input type="text" name="text2" maxLength="34">

</body>
</html>

Download in other formats:

Original Format