Side navigation
Ticket #5739: test_jq1.42 is false.html
File test_jq1.42 is false.html, 1.2 KB (added by dongdongface, January 01, 2010 12:52PM UTC)
test_jq1.42 is false.html
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>title</title>
<!--the code work in jq1.3.2 , not work -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.4a2.min.js"></script>-->
<script>
$(document).ready(function () {
$("form").submit(function () {
if ($(this).find(".need[value='']").size() > 0) {
alert("asdas")
$(this).find(".need[value='']:first").focus().css("border","1px solid #f00");
alert("please input[" + $(this).find(".need[value='']").attr("title") + "]");
return false
}
})
});
</script>
</head>
<body>
<form>
<textarea rows="10" name="Content" id="content" class="need" title="content1"></textarea>*need<br/>
<input type="text" /><br/>
<input type="text" class="need" title="content3"/>*need<br/>
<INPUT type="text" class="need" title="content4">*need<br/>
<input type="submit" value="submit"/>
</form>
</body>
</html>
Download in other formats:
Original Format
File test_jq1.42 is false.html, 1.2 KB (added by dongdongface, January 01, 2010 12:52PM UTC)
test_jq1.42 is false.html
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>title</title>
<!--the code work in jq1.3.2 , not work -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<!--<script type="text/javascript" src="http://code.jquery.com/jquery-1.4a2.min.js"></script>-->
<script>
$(document).ready(function () {
$("form").submit(function () {
if ($(this).find(".need[value='']").size() > 0) {
alert("asdas")
$(this).find(".need[value='']:first").focus().css("border","1px solid #f00");
alert("please input[" + $(this).find(".need[value='']").attr("title") + "]");
return false
}
})
});
</script>
</head>
<body>
<form>
<textarea rows="10" name="Content" id="content" class="need" title="content1"></textarea>*need<br/>
<input type="text" /><br/>
<input type="text" class="need" title="content3"/>*need<br/>
<INPUT type="text" class="need" title="content4">*need<br/>
<input type="submit" value="submit"/>
</form>
</body>
</html>