取得した要素の文字列を選択できなくしたく、.style.user-select = 'none' ;
をしたのですが、どうもエラーが出てしまいます。
定義の仕方が間違っているのでしょうか?
(検証サイト:google検索結果ページ)
user-selectはできない
document.querySelector('#rso > div > div > div:nth-child(1) > div > div.rc > h3 > a').style.user-select = 'none' ; Uncaught ReferenceError: Invalid left-hand side in assignment
widthならできる
document.querySelector('#rso > div > div > div:nth-child(1) > div > div.rc > h3 > a').style.width = '1000' ; "1000"
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。