Jump to content

setTimeout


Recommended Posts

Значение по умолчанию у него есть. Если браузер выполняет его без указания значения на время, то это спецификация браузера и в других версиях / других браузеров можеть не работать так. Всегда пишите значения timeout-а

th = window.setTimeout( "myFunc()", 1000);

1000 = 1 секунда

Link to comment
Share on other sites

и куда мне его совать помогите я в Html'е лузер код чужой она у меня по timeout'у вылетает

<html>

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<script language="JavaScript" type="text/JavaScript">

<!--

function MM_reloadPage(init) { //reloads the window if Nav4 resized

if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}

MM_reloadPage(true);

//-->

</script>

<link href="service.css" rel="stylesheet" type="text/css">

<style type="text/css">

<!--

.style1 {font-size: 14px}

-->

</style>

</head>

<body>

Link to comment
Share on other sites

и куда мне его совать помогите я в Html'е лузер код чужой она у меня по timeout'у вылетает

<html>

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<script language="JavaScript" type="text/JavaScript">

<!--

function MM_reloadPage(init) { //reloads the window if Nav4 resized

if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}

MM_reloadPage(true);

//-->

</script>

<link href="service.css" rel="stylesheet" type="text/css">

<style type="text/css">

<!--

.style1 {font-size: 14px}

-->

</style>

</head>

<body>

Задавай вопрос сразу по существу и юзай CODE для выделения кода!

ЗЫ Что хочешь от Java Script'a(Что надо сделть-то)?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...