SoFunction
Updated on 2025-04-07

A in-page search code implemented using js

<FORM name=search onsubmit="return findInPage();">  
<INPUT onchange="n = 0;" size=15 name=string value="Prime Minister">
<INPUT type=submit value=In-page search...></FORM>
<SCRIPT language=JavaScript>  
var NS4 = ();  
var IE4 = ();  
var win = window;  
var n = 0;  
function findInPage(str) {  
var txt, i, found;  
if (str == "")  
return false;  
if (NS4) {  
if (!(str))  
while((str, false, true))  
n++;  
else  
n++;  
if (n == 0)  
alert("Not found.");  
}  

if (IE4) {  
txt = ();  
for (i = 0; i <= n && (found = (str)) != false; i++) {  
("character", 1);  
("textedit");  
}  
if (found) {  
("character", -1);  
(str);  
();  
();  
n++;  
}  
else {  
if (n > 0) {  
n = 0;  
findInPage(str);  
}  
else  
alert(" Sorry, I didn't find it on this page. Did you go to another category to check it out?\n If you haven't found it yet, please send me an email (fred_fan@), I will try my best to find it...\n\nYun Haier\nhttp://");
}  
}  

return false;  
}  

</SCRIPT> 

China Daily Global Online News: British Prime Minister Blair announced on May 10 at the Trimdon Labour Club in Sedgefield Constituency in northern England that he has decided to resign as Labor Leader and will resign as British Prime Minister on June 27. According to British law, after the Labor Party elects a new party leader, its new leader will replace Blair as cabinet prime minister until the expiration of this prime minister's term in May 2010.

According to British media reports, now the Chancellor of the Exchequer Gordon Brown in Blair’s cabinet is considered the hottest candidate for the new leader of the Labor Party and the new British Prime Minister. Blair said on May 1 that Brown will become an excellent prime minister.