<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>selector starts with...</title>
</head>
<body>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
<input id="t1" name="t1"><img src="lilerr.gif" id="err_1" /><br>
<input id="t2" name="t2"><img src="lilerr.gif" id="err_2" /><br>
<img id="not_me" src="info_24.gif" /><br>
<script>
if ($(":image[id^='err']").length > 0)
{
alert('yes');
$(":image[id^='err']").attr("src","noerr.gif");
}
</script>
</body>
</html>
|