Usman bahi Cs101 ki assign hay .. apna kam kho dkarna cahayah .. borii bat ... wasay May nay bana liyah hay .. last button may thora masla hay .. but .. check it ..
Code:
<HTML>
<HEAD>
<TITLE>khan_z</TITLE>
<SCRIPT>
function entername(){
words = new Array ( 5 ) ;
for ( a = 0 ; a < words.length ; a = a + 1 ) {
words[ a ] = window.prompt( "Enter Names # " ,"" ) ;
}
}
function sortword(){
words.sort( ) ;
window.alert( "Name has been Sorted" ) ;
}
function displayname(){
b=1;
while(b<=5)
for ( c = 0 ;c < words.length ; c++ )
{
window.alert("The Name you Entered Are: \n"+b+")."+ "Array" + "{"+c+"} = "+ words[ c ]);
b++; }
}
</SCRIPT>
</HEAD>
<BODY>
<center><h4>Array With Events</h4></center>
<input type ="button" value="Enter Name" name="1" onClick=entername()><br><br>
<input type ="button" value="Sort Name" name="2" onClick=sortword()><br><br>
<input type ="button" value="Show Name" name="3" onClick=displayname()>
</BODY>
</HTML>
Bookmarks