aboutsummaryrefslogtreecommitdiff
path: root/files/he/web/api/window/confirm/index.html
blob: 54ab3e903a3ee3e29d36f44ee9cec254d3f503d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
title: Window.confirm()
slug: Web/API/Window/confirm
tags:
  - אישור הודעה
  - דפדפן
  - הודעה
  - חלון התראה
  - פופ-אפ
translation_of: Web/API/Window/confirm
---
<div>{{ApiRef("Window")}}</div>

<div><code><strong>Window.confirm()</strong></code> - מציגה תיבת דו-שיח עם תוכן וכפתורי אישור וביטול.</div>

<h2 id="Syntax" name="Syntax">תחביר</h2>

<pre><em>result</em> = window.confirm(<em>message</em>);
</pre>

<ul>
 <li><code>message</code> - מחרוזת שתופיע בגוף ההודעה.</li>
 <li><code>result</code> - ערך בוליאני בו מצוינת בחירת המשתמש (אישור או ביטול).</li>
</ul>

<h2 id="Example" name="Example">דוגמאות</h2>

<pre>if (window.confirm("Do you really want to leave?")) {
  window.open("exit.html", "Thanks for Visiting!");
}
</pre>

<p>הדוגמה תציג את ההודעה הבאה:</p>

<p><img alt="firefox confirm" src="https://mdn.mozillademos.org/files/7163/firefoxcomfirmdialog_zpsf00ec381.png" style="height: 119px; width: 354px;"><br>
  </p>

<h2 id="Notes" name="Notes">הערות</h2>

<p><span class="comment">The following text is shared between this article, DOM:window.prompt and DOM:window.alert</span> תיבות דו-שיח מונעות מהמשתמש גישה לממשק התוכנית עד אשר היא תיסגר.</p>

<h2 id="Specification" name="Specification">מפרט</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('HTML WHATWG', 'timers-and-user-prompts.html#dom-confirm', 'confirm()')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="תאימות_דפדפן">תאימות דפדפן</h2>



<p>{{Compat("api.Window.confirm")}}</p>

<h2 id="See_also" name="See_also">ראה גם</h2>

<ul>
 <li>{{domxref("window.alert","alert")}}</li>
 <li>{{domxref("window.prompt","prompt")}}</li>
</ul>