LoginSignup
60
57

More than 5 years have passed since last update.

JavaScriptで選択された文字列を取得

Last updated at Posted at 2012-10-29

いつも忘れる.

var selectedText = window.getSelection().toString();

参考リンク: window.getSelection - Document Object Model (DOM) | MDN

60
57
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
60
57