All pastes #168573 Raw Edit

doveshack

public text v1 · immutable
·published 2006-09-13 03:31 UTC
rendered paste body
<html>
<head>
<script type="text/javascript">


function search_results(s)
{

	var names = new Array(5);

	names [0] = "Kunal";
	names [1] = "Kumar";
	names [2] = "Paper";
	names [3] = "Minolta";
	names [4] = "KonicaMinolta";


	var search = s.value;

	for (i=0; i<=4; i++)
	{

		if (names[i].indexOf(search) == 0)
		{
			var p = document.createElement("P");

			p.appendChild( document.createTextNode(names[i]) );

			document.getElementById("show_number").appendChild( p );
		}
	}
	
var I, len = p.childNodes.length; 

for (i = 0; I < len; I++) 

alert(p.childNodes[i].nodeType);



 p.removeChild(node);
 var p = document.getElementById("my_id");


}


</script>



</head>


<body>


Search:<input type="text" id="fname" onkeyup="search_results(this)">
<br>

<p id="show_number"></p>





</body>


</html>