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/ko/web/api/selection/tostring | |
| parent | 1109132f09d75da9a28b649c7677bb6ce07c40c0 (diff) | |
| download | translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.gz translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.bz2 translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.zip | |
initial commit
Diffstat (limited to 'files/ko/web/api/selection/tostring')
| -rw-r--r-- | files/ko/web/api/selection/tostring/index.html | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/files/ko/web/api/selection/tostring/index.html b/files/ko/web/api/selection/tostring/index.html new file mode 100644 index 0000000000..3048c8a65f --- /dev/null +++ b/files/ko/web/api/selection/tostring/index.html @@ -0,0 +1,58 @@ +--- +title: Selection.toString() +slug: Web/API/Selection/toString +translation_of: Web/API/Selection/toString +--- +<div> +<div> +<div>{{ ApiRef("DOM") }}{{SeeCompatTable}}</div> +</div> +</div> + +<p><strong><code>Selection.toString()</code></strong> 메소드는 selection 객체가 현재 나타내는 문자열을 반환합니다. 즉, 현재 선택된 텍스트의 문자열.</p> + +<h2 id="Syntax" name="Syntax">Syntax</h2> + +<pre class="syntaxbox"><em>str</em> =<em> sel</em>.toString() +</pre> + +<h3 id="Return_value">Return value</h3> + +<p>A string representing the selection.</p> + +<h2 id="Description" name="Description">Description</h2> + +<p>This method returns the currently selected text.</p> + +<p>In <a href="en/JavaScript">JavaScript</a>, this method is called automatically when a function the selection object is passed to requires a string:</p> + +<pre class="brush: js">alert(window.getSelection()) // What is called +alert(window.getSelection().toString()) // What is actually being effectively called. +</pre> + +<h2 id="Specifications">Specifications</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 Editing', '#dom-selection-stringifier', 'Selection.toString()')}}</td> + <td>{{Spec2('HTML Editing')}}</td> + <td>Initial definition</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2> + +<div>{{Compat("api.Selection.toString")}}</div> + +<h2 id="See_also" name="See_also">See also</h2> + +<ul> + <li>{{domxref("Selection")}}, the interface it belongs to.</li> +</ul> |
