首页 Autoit取得DOM对象的属性值

Autoit取得DOM对象的属性值

举报
开通vip

Autoit取得DOM对象的属性值Autoit取得DOM对象的属性值 AutoitDOM ; ******************************************************* ; Example 1 - Open a browser with the basic example, check to see if the ; addressbar is visible, if it is turn it off, if it is not turn it on ; ************************...

Autoit取得DOM对象的属性值
Autoit取得DOM对象的属性值 AutoitDOM ; ******************************************************* ; Example 1 - Open a browser with the basic example, check to see if the ; addressbar is visible, if it is turn it off, if it is not turn it on ; ******************************************************* ; #include $oIE = _IE_Example ("basic") If _IEPropertyGet ($oIE, "addressbar") Then MsgBox(0, "AddressBar Status", "AddressBar Visible, turning it off") _IEPropertySet ($oIE, "addressbar", False) Else MsgBox(0, "AddressBar Status", "AddressBar Invisible, turning it on") _IEPropertySet ($oIE, "addressbar", True) EndIf ; ******************************************************* ; Example 2 - Open a browser with the form example and get a reference to the form ; textarea element. Get the coordinates and dimensions of the text area, ; outline its shape with the mouse and come to rest in the center ; ******************************************************* ; $oIE = _IE_Example("form") $oForm = _IEFormGetObjByName($oIE, "ExampleForm") $oTextArea = _IEFormElementGetObjByName($oForm, "textareaExample") ; Get coordinates and dimensions of the textarea $iScreenX = _IEPropertyGet($oTextArea, "screenx") $iScreenY = _IEPropertyGet($oTextArea, "screeny") $iBrowserX = _IEPropertyGet($oTextArea, "browserx") $iBrowserY = _IEPropertyGet($oTextArea, "browserY") $iWidth = _IEPropertyGet($oTextArea, "width") $iHeight = _IEPropertyGet($oTextArea, "height") ; Outline the textarea with the mouse, come to rest in the center MouseMove($iScreenX, $iScreenY) MouseMove($iScreenX + $iWidth, $iScreenY) MouseMove($iScreenX + $iWidth, $iScreenY + $iHeight) MouseMove($iScreenX, $iScreenY + $iHeight) MouseMove($iScreenX, $iScreenY) MouseMove($iScreenX + $iWidth/2, $iScreenY + $iHeight/2) _IEPropertyGet 返回浏览器或者 DOM 元素的一个选定的属性. #include _IEPropertyGet ( ByRef $o_object, $s_property ) $o_object 一个 InternetExplorer.Application 或者 DOM 元素的对象变量 $s_property 要选定的属性(参考注意) 成功: 所选属性的值 失败: 返回 0 并设置 @ERROR @Error: 0 ($_IEStatus_Success) = 没有错误 3 ($_IEStatus_InvalidDataType) = 无效数据类型 4 ($_IEStatus_InvalidObjectType) = 无效对象类型 5 ($_IEStatus_InvalidValue) = 无效值 @Extended: 包含无效 参数 转速和进给参数表a氧化沟运行参数高温蒸汽处理医疗废物pid参数自整定算法口腔医院集中消毒供应 数量 更多信息请参考 MSDN. 下方的表中规定了每个属性可以使用的详细信息. 一些属性只能用于 DOM 元素, 其它用于浏览器. "addressbar" 返回一个布尔值用来说明浏览器地址栏是可见还是隐藏. "browserx" 返回一个文档元素相对于浏览器左(侧)顶(部)的 X 坐标. "browsery" 返回一个文档元素相对于浏览器左(侧)顶(部)的 Y 坐标. 返回一个布尔值用来说明对象是处于一个浏览的操作还是"busy" 下载的操作. 返回一个布尔值用来说明对象是否可以用鼠标或者键盘编"contenteditable" 辑. 返回一个布尔值用来说明浏览器是全屏模式还是正常窗口"fullscreen" 模式. "height" 返回浏览器主窗口或者一个文档元素的高度. 返回IE主窗口的句柄(HWND),可以用于大多数 AutoIt 的 "hwnd" Win* 函数中. "innerhtml" 返回排除开始和结尾元素标记的 HTML. 返回一个元素显示的文本(但没有任何标记).通常等同于"innertext" outertext. "isdisabled" 返回一个值说明用户是否可以和对象进行交互. "left" 返回对象主窗口左侧边缘与屏幕的相对坐标. "locationname" 返回当前显示中IE资源的名称. "locationurl" 返回当前显示中IE资源的URL地址. "menubar" 返回一个布尔值用来说明浏览器菜单栏是否可见. 返回一个布尔值用来说明浏览器当前操作是否是在脱机模"offline" 式中. 返回一个元素显示的文本(但没有任何标记).通常等同于 "outertext" innertext. "outerhtml" 获取经过渲染的HTML的包含开始和结束元素标签的元素. "readystate" 返回对象准备状态. 获取当前页面可由其访问的页面的网址的字符串(但只当通"referrer" 过该页上的链接才能访问时, 否则字符串为空.). "resizable" 返回一个布尔值用来说明浏览器否是可以被改变大小的. Retrieves the x-coordinate of the top left corner of "screenx" a document object or the browser, relative to the screen. Retrieves the y-coordinate of the top left corner of "screeny" a document object or the browser, relative to the screen. "silent" 返回一个布尔值用来说明浏览器能否显示对话框. "statusbar" 返回一个布尔值用来说明浏览器状态栏是否可见. "statustext" 返回浏览器状态栏上显示的文字. 返回一个布尔值用来说明浏览器是否处于剧院模式. 在剧"theatermode" 院模式, 浏览器主窗口将充满整个屏幕并且显示一个包含 极少浏览按钮的工具条.. 返回文档标题.注意这个不同与Window标题(通常以文档标"title" 题开始), Window标题会额外的windows注册表信息附加在 上面. "toolbar" 返回一个布尔值用来说明浏览器工具栏可见还是隐藏. "top" 返回浏览器主窗口上边在屏幕上的坐标. "visible" 返回一个布尔值用来说明浏览器可见还是隐藏. "width" 返回浏览器主窗口的宽度. Retrieves an ID assigned by the DOM that is unique among "uniqueid" all elements. This can be used in any context that requires an element ID. 返回浏览器代码名称 (这个属性中Mozilla有一个默认"appcodename" 值). "appminorversion" 返回应用程序的小版本值. 回浏览器名称 (这个属性中Microsoft Internet Explorer"appname" 有一个默认值). "appversion" 返回浏览器平台和版本. 返回当前浏览器语言 (返回值是这里面的 Language "browserlanguage" Codes). 返回客户端浏览器是否是支持cookies.cookies是那些被"cookieenabled" 储存在客户端电脑里面. "cpuclass" 回字符串说明CPU类型(返回值可以在这里查到here). "javaenabled" 返回Java是否可以使用. "online" 返回值说明系统是否在global offline mode. "platform" 返回用户操作系统的名称 (返回值可以在这里查到here). "systemlanguage" 回操作系统的语言(返回值是这里面的Language Codes). "useragent" 获取相当于HTTP用户代理请求文件头的字符串. 返回操作系统的自然语言设置 (返回值是这里面之一"userlanguage" Language Codes). 返回包含每个在用户配置对象中的属性的数组(属性列表可 查看here). 返回一个二维数组, 其中第一维有两个元素. "vcard" 第一个元素(0)包含属性名, 第二个元素(1)包含相应的值. 第二维有29个元素(0到28).
本文档为【Autoit取得DOM对象的属性值】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_314871
暂无简介~
格式:doc
大小:21KB
软件:Word
页数:6
分类:互联网
上传时间:2017-11-09
浏览量:27