How about this:<!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=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>Simple Find</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.0/js/dojo/dijit/themes/tundra/tundra.css">
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0"></script>
<script type="text/javascript">
dojo.require("esri.tasks.find");
var find, params;
function init() {
esri.hide(dojo.byId('loading'));
find = new esri.tasks.FindTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/");
params = new esri.tasks.FindParameters();
params.layerIds = [2];
params.searchFields = ["STATE_NAME","STATE_FIPS"];
}
function doFind() {
esri.show(dojo.byId('loading'));
params.searchText = dojo.byId("searchText").value;
find.execute(params, showResults);
}
function showResults(results) {
esri.hide(dojo.byId('loading'));
var result, attribs;
var s = ["<table border=\"1\"><thead><tr style=\"background-color:#ccc;\"><td>State Name</td><td>FIPS</td><td>Population (1990)</td><td>Population (1999)</td></tr></thead><tbody id=\"states\">"];
for (var i=0, il=results.length; i<il; i++) {
result = results;
attribs = result.feature.attributes;
s.push("<tr><td>" + attribs.STATE_NAME + "</td><td>" + attribs.STATE_FIPS + "</td><td>" + attribs.POP1990 + "</td><td>" + attribs.POP1999 + "</td></tr>");
}
s.push("</tbody></table>");
dojo.byId("tbl").innerHTML = s.join("");
}
dojo.addOnLoad(init);
</script>
</head>
<body class="tundra">
Find by State Name or State FIPS: <input type="text" id="searchText" size="40" value="Kansas" />
<input type="button" value="Find" onclick="doFind()" />
<div id="loading"><img src="http://help.arcgis.com/en/webapi/javascript/arcgis/demos/map/images/loading.gif" /></div>
<div id="tbl"></div>
</body>
</html>
That's the simple find task sample. The lines I added are in red.