Bug Tracker

Ticket #2321: button-element-bug.html

File button-element-bug.html, 656 bytes (added by Anks, 15 years ago)
Line 
1<html>
2<head>
3<title>Testing button element value</title>
4<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.2.3.js"></script>
5<script type="text/javascript">
6jQuery(function () {
7    jQuery("#testButton").click(function () {
8        alert(jQuery(this).val());         // Firefox alerts "buttonValue", IE alerts "Content <em>inside</em> button"
9        alert(jQuery(this).attr('value'));  // Firefox alerts "buttonValue", IE alerts "Content <em>inside</em> button"
10    });
11    });
12</script>
13</head>
14<body>
15<button id="testButton" value="buttonValue">
16Content <em>inside</em> button
17</button>
18</body>
19</html>