简体   繁体   English

我可以在使用JavaScript的现代浏览器中使用或打开“插入”插入符号吗?

[英]Can I use or turn on the 'insert' caret in modern browsers using javascript?

I have a situation where I'd prefer the old flashing box caret (instead of the standard flashing line) that erases the character it is currently situated over and replaces it with whatever the user just typed. 我遇到的情况是,我希望使用旧的闪烁框插入符号(而不是标准的闪烁线条)来擦除当前位于其上方的字符,并用用户刚刚键入的任何字符替换它。

In my case, I would like it for 就我而言,我希望

<input type='text' /> 

but even just turning it on anywhere would be great. 但是即使只是在任何地方打开它也很棒。

I recall it wasn't so easy to turn on in native windows programming, so I'm not expecting much here. 我记得在本机Windows编程中打开它并不是那么容易,所以我在这里期望不高。

Anyone know how to do it? 有人知道怎么做吗?

Firefox, Safari, and Chrome do not support an insert, over over-write, mode. Firefox,Safari和Chrome不支持插入(覆盖)模式。 In IE (only) you can query if it is turned on by the OS via document.queryCommandValue("OverWrite") but there is not a way to set it. 在IE中(仅),您可以通过document.queryCommandValue("OverWrite")来查询操作系统是否将其打开,但是无法进行设置。

However, it can be mimicked . 但是,它可以被模仿

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有没有办法在现代浏览器中用javascript替换这个lodash _.chain代码? - Is there a way I can replace this lodash _.chain code with javascript in modern browsers? 如何在Chrome和其他现代浏览器中使用离线事件和在线事件? - How can I use onoffline and ononline events in Chrome and other modern browsers? 如何使用javascript在插入符号中插入字符? - How do I insert a character at the caret with javascript? 如何在现代浏览器中使用mousein事件? - How do I use the mousein event in modern browsers? 如何使用Java中的RegExp从字符串中删除插入符号(^)? - How can I remove the caret(^) from a string using a RegExp in Javascript? 使用contentEditable时,如何使用Javascript获取插入符号元素? - How can I get the element the caret is in with Javascript, when using contentEditable? 如何在现代浏览器中实现lodash _.remove函数? - How can I implement the lodash _.remove function in modern browsers? 如何在现代浏览器中全局监听获取完成? - How can I globally listen for fetch completion in modern browsers? 在现代浏览器中,JavaScript 书签是否有任何安全限制? - In modern browsers, is there any security limitation for JavaScript bookmarklets? 使用Javascript优化现代浏览器(Chrome)的计时器 - Optimising timers for modern browsers (Chrome) in Javascript
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM