JavaScript Reference/Javascript Methods/assign

Материал из Web эксперт
Перейти к: навигация, поиск

"assign()" Example

    
<html>
<body>
<script language="JavaScript">
    function function1() {
        location.assign("http://www.wbex.ru/");
    }
</script>
<input type="button" value="Load new page" onclick="function1();">
</body>
</html>



"assign()" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |location                                                      |
+----------------+--------------------------------------------------------------+



"assign()" Syntax, Parameters and Note

Note:
Load a new HTML document.
    
Syntax:
    
location.assign(param1)

Parameters:
    param1   Required; the URL of the new document.