如何禁用页面中的每次点击,仅在输入文本中自动对焦?

dau*_*tan 3 html javascript css

我可以只写文本输入并输入,禁用每次单击或移动光标,仅在文本输入中自动对焦吗?

<input autofocus placeholder="RR" name="RR" id="RR" type="text">
Run Code Online (Sandbox Code Playgroud)

谢谢..

ato*_*3ls 5

放入pointer-events : none;CSS中

cursor : not-allowed; /* or none to allow clicks*/如果你想禁用光标,请输入。

添加autofocus到自动对焦

<input autofocus placeholder="RR" name="RR" id="RR" type="text" autofocus>
Run Code Online (Sandbox Code Playgroud)