CDHtmlDialog - 没有为html输入文本触发事件DHTML_EVENT_ONCHANGE [英] CDHtmlDialog - The event DHTML_EVENT_ONCHANGE is not getting fired for html input text

查看:95
本文介绍了CDHtmlDialog - 没有为html输入文本触发事件DHTML_EVENT_ONCHANGE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的CDHtmlDialog中,我正在使用输入文本加载html。

In my CDHtmlDialog I am loading html with input text.

事件DHTML_EVENT_ONCHANGE未被html触发输入文字。

The event DHTML_EVENT_ONCHANGE is not getting fired for html input text.

我试过vs2008和vs2015。我在两者上面临同样的问题。

I tried with vs2008 and vs2015. I am facing same problem on both.

当用户输入或复制并粘贴文本时,如何获取输入文本的当前值?

How to get the current value of input text when user type or copy and paste the text?

推荐答案

在HTML中,当用户离开文本框时会触发此事件:

https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa753155%28v%3dvs.85%29

In HTML, this event is fired when the user leaves the textbox: https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa753155%28v%3dvs.85%29.

在不离开文本框的情况下几乎立即进行文本检测的解决方案之一:使用检查文本的计时器。它也可以在JavaScript中设置。


这篇关于CDHtmlDialog - 没有为html输入文本触发事件DHTML_EVENT_ONCHANGE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆