diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:17 -0500 |
commit | da78a9e329e272dedb2400b79a3bdeebff387d47 (patch) | |
tree | e6ef8aa7c43556f55ddfe031a01cf0a8fa271bfe /files/it/web/api/document/createrange/index.html | |
parent | 1109132f09d75da9a28b649c7677bb6ce07c40c0 (diff) | |
download | translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.gz translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.bz2 translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.zip |
initial commit
Diffstat (limited to 'files/it/web/api/document/createrange/index.html')
-rw-r--r-- | files/it/web/api/document/createrange/index.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/files/it/web/api/document/createrange/index.html b/files/it/web/api/document/createrange/index.html new file mode 100644 index 0000000000..6c78f471f3 --- /dev/null +++ b/files/it/web/api/document/createrange/index.html @@ -0,0 +1,30 @@ +--- +title: document.createRange +slug: Web/API/Document/createRange +translation_of: Web/API/Document/createRange +--- +<div>{{APIRef("DOM")}}</div> + +<p>Restituisce un nuovo oggetto <code><a href="it/DOM/range">Range</a></code>.</p> + +<h3 id="Sintassi" name="Sintassi">Sintassi</h3> + +<pre class="eval"><var>range</var> = <var>document</var>.createRange(); +</pre> + +<p><code>range</code> è l'oggetto <a href="it/DOM/range">range</a> creato.</p> + +<h3 id="Esempio" name="Esempio">Esempio</h3> + +<pre class="eval">var range = document.createRange(); +range.setStart(startNode, startOffset); +range.setEnd(endNode, endOffset); +</pre> + +<h3 id="Note" name="Note">Note</h3> + +<p>Una volta che un <code>Range</code> è stato creato, occorre impostare il punto iniziale e quello finale prima di poter utilizzare la maggior parte dei suoi metodi.</p> + +<h3 id="Specifiche" name="Specifiche">Specifiche</h3> + +<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-DocumentRange-method-createRange">DOM Level 2 Range: DocumentRange.createRange</a></p> |