Bug Tracker

Ticket #5739: test_jq1.42 is false.html

File test_jq1.42 is false.html, 1.2 KB (added by dongdongface, 10 years ago)

test_jq1.42 is false.html

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5<title>title</title>
6<!--the code work in jq1.3.2 , not work -->
7<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
8<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.4a2.min.js"></script>-->
9<script>
10
11$(document).ready(function () {
12    $("form").submit(function () {
13        if ($(this).find(".need[value='']").size() > 0) {
14                alert("asdas")
15                $(this).find(".need[value='']:first").focus().css("border","1px solid #f00");
16            alert("please input[" + $(this).find(".need[value='']").attr("title") + "]");
17            return false
18        }
19    })
20}); 
21</script>
22</head>
23
24<body>
25<form>
26<textarea rows="10" name="Content" id="content" class="need" title="content1"></textarea>*need<br/>
27<input type="text"  /><br/>
28<input type="text" class="need" title="content3"/>*need<br/>
29<INPUT type="text" class="need" title="content4">*need<br/>
30<input type="submit" value="submit"/>
31   </form>
32</body>
33</html>