Bug Tracker

Ticket #5252: test.html

File test.html, 498 bytes (added by johnH, 13 years ago)

Example of attr not working correctly in IE.

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  "http://www.w3.org/TR/html4/loose.dtd"> 
2<html> 
3<head> 
4<title>Jquery Bug</title> 
5<script type="text/javascript" src="jquery/jquery-1.3.2.min.js"></script>
6<script type="text/javascript"> 
7        $(function(){
8                $(":input").attr("onfocus","alert(this.id);");
9        })
10</script> 
11</head> 
12<body> 
13<form id="test">
14        Move the focus to this field and you shold get an alert.<input type="text" id="textid">
15</form>
16</body> 
17</html>