Selectors/API/jQuery - Sample Code
:empty
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("#run").click(function(){
$("td:empty").text("empty!").css('background', 'rgb(255,220,200)');
});
});
</script>
<style>
td { text-align:center; }
</style>
</head>
<body>
<input type="button" id="run" value="Run" />
<table border="1">
<tr><td>TD #0</td><td></td></tr>
<tr><td>TD #2</td><td></td></tr>
<tr><td></td><td>TD#5</td></tr>
</table>
</body>
</html>
[実行結果]