> ## Content Index
> Fetch the complete content index at: https://mennankose.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# JavaScript'te Seçilmiş Metindeki Seçimi Kaldırmak
- URL: https://mennankose.com/javascriptte-secilmis-metindeki-secimi-kaldirmak/
- Published: 2017-03-31T16:18:33.000Z
- Updated: 2026-10-29T05:26:24.000Z
- Author: Mennan Köse
- Tags: JavaScript, #Import 2026-11-06 07:43

JavaScript’te input bir alanda olan seçili metindeki seçimi kaldırmak için aşağıdaki yöntemden faydalanabiliriz.

```javascript
if (window.getSelection) {
    window.getSelection().removeAllRanges();
} else if (document.selection) {
    document.selection.empty();
}

```

**window.getSelection** Internet Explorer 9+ ve diğer tarayıcılar tarafından desteklenmektedir. **document.selection** ise Internet Explorer 8 ve altı tarayıcılar tarafından desteklenmektedir.

Kaynak: [https://www.thewebflash.com/select-or-deselect-text-inside-an-element-using-js/](https://www.thewebflash.com/select-or-deselect-text-inside-an-element-using-js/?ref=mennankose.com)