
웹 브라우저가 온라인으로 작동하기 시작하면 ononline 속성이 트리거됩니다. 다음 코드를 실행하여 ononline 속성 -
<!DOCTYPE html>
<html>
<body ononline = "onlineFunc()" onoffline = "offlineFunc()">
<script>
function onlineFunc() {
alert ("Working online!");
}
function offlineFunc() {
alert ("Workinf offline!");
}
</script>
<p>Got o the web browser menu bar and click the File menu. Select
"Work Offline" and toggle between online and offline.</p>
</body>
</html>위 내용은 브라우저가 온라인 작업을 시작할 때 HTML로 스크립트를 실행하시겠습니까?의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!