html文本框控件的常用属性、事件和方法
窗口事件 (Window Events)
仅在 body 和 frameset 元素中有效。
属性 值 描述
onload 脚本 当文档载入时执行脚本
onunload 脚本 当文档卸载时执行脚本
表单元素事件 (Form Element Events)
仅在表单元素中有效。
属性 值 描述
onpropertychange 脚本 当文本内容改变时执行脚本
onchange 脚本 当元素改变时执行脚本
onsubmit 脚本 当表单被提交时执行脚本
onreset 脚本 当表单被重置时执行脚本
onselect 脚本 当元素被选取时执行脚本
onblur 脚本 当元素失去焦点时执行脚本
onfocus 脚本 当元素获得焦点时执行脚本
键盘事件 (Keyboard Events)
在下列元素中无效:base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, 以及 title 元素。
属性 值 描述
onkeydown 脚本 当键盘被按下时执行脚本
onkeypress 脚本 当键盘被按下后又松开时执行脚本
onkeyup 脚本 当键盘被松开时执行脚本
鼠标事件 (Keyboard Events)
在下列元素中无效:base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, title 元素。
属性 值 描述
onclick 脚本 当鼠标被单击时执行脚本
ondblclick 脚本 当鼠标被双击时执行脚本
onmousedown 脚本 当鼠标按钮被按下时执行脚本
onmousemove 脚本 当鼠标指针移动时执行脚本
onmouseout 脚本 当鼠标指针移出某元素时执行脚本
onmouseover 脚本 当鼠标指针悬停于某元素之上时执行脚本
onmouseup 脚本 当鼠标按钮被松开时执行脚
相关文档:
首先在应用程序的WEB.CONFIG修改如下节点。
<httpHandlers>
<add verb="*" path="*.html" type="System.Web.UI.PageHandlerFactory"/>
</httpHandlers>
<assemblies>
<buildProviders>
<add ext ......
从网上的SThtmlDialog例子改过来的,在MFC程序中显示HTML网页的方法
1、在视图类中添加头文件#include <Htmlctrl.h>
2、在视图头文件中添加变量
HWND m_hwndHtml;//HTML控件窗口句柄
HINSTANCE m_HtmlViewInstance;//动态链接库装载句柄
并赋予初始值m_HtmlViewInstance = 0;
3、创建网页控件, ......
先来看段代码:
document.domain = 'ray.com';
这段代码到底是什么意思呢?
首先,我们来看下HTML DOM 关于这个的说明:
domain of type DOMString, readonlyThe domain name of the server that served the document, or null if the server cannot be identified by a domain name.
这段话的意思是这个值是DO ......
静态结构
<html>
<head>
<title>标题<title>
</head>
<body>..........文件内容..........
</body>
</html>
1.文件标题
<title>..........</title>
2.文件更新--<meta>
【1】10秒后自动更新一次
<meta http-equiv="refresh" content=10>
【2】10秒後自动连结到另一文件
......