HBCMS更多的中文手册参考:

isHomePage Method

DHTML文档教程

Determines whether the specified URL refers to the client's home page.

dhtml语法

bQueryHome = homePage.isHomePage(sPageURL)

Parameters

sPageURL Required. Stringthat specifies the path and/or file name to compare against a client's specified home page.

Return Value

Boolean. Returns one of the following values:

trueThe client's home page is the same as the provided argument.
falseThe client's home page is different than the provided argument.

Remarks

The isHomePage method returns false if the argument and a user's home page are the same, but the document calling the method is on a different domain than the user's home page.

DHTML代码范例

This example uses the isHomePage method to determine whether a user's home page is the same as the specified URL.

<HTML XMLNS:IE>
<HEAD>
<STYLE>
@media all {
IE\:HOMEPAGE {behavior:url(#default#homepage)}
}
</STYLE>
<SCRIPT>
function fnVerify(){
sQueryHome = oHomePage.isHomePage(oHomeHref.value);
alert(sQueryHome);
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="Verify" onclick="fnVerify()">
</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

homePage

更多语法参考

Introduction to DHTML Behaviors