Sets a user's home page to the specified value.
dhtml语法
homePage.setHomePage(sPageURL)
Parameters
sPageURL |
Required.
Stringthat specifies the path and/or file name of the user's home page. |
Return Value
No return value.
Remarks
The setHomePage method prompts the user to confirm the new home page value before setting it on the browser.
DHTML代码范例
This example uses the setHomePage method to set a user's home page.
<HTML XMLNS:IE>
<HEAD>
<STYLE>
@media all {
IE\:HOMEPAGE {behavior:url(#default#homepage)}
}
</STYLE>
<SCRIPT>
function fnSet(){
oHomePage.setHomePage(oHomeHref.value);
event.returnValue = false;
}
</SCRIPT>
</HEAD>
<BODY>
<IE:HOMEPAGE ID="oHomePage" />
<INPUT TYPE=text ID=oHomeHref VALUE="/hbcms/php/r.php?url=http%3A%2F%2Fwww.microsoft.com">
<INPUT TYPE=button VALUE="Set" onclick="fnSet()">
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
是否符合公共标准
There is no public standard that applies to this method.
Applies To
更多语法参考
Introduction to DHTML Behaviors