
js
huhuliuxia
这个作者很懒,什么都没留下…
展开
-
js 控制json在html中显示
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml">json数据植入html的演示在 JavaScript 中创建 JSON 对象Name: Age: Address: Phone: var JSONObject=原创 2014-09-15 11:11:17 · 1554 阅读 · 0 评论 -
js发post请求
var xmlobj; //定义XMLHttpRequest对象function CreateXMLHttpRequest(){if(window.ActiveXObject) //如果当前浏览器支持Active Xobject,则创建ActiveXObject对象{ //xmlobj = new ActiveX转载 2016-03-07 09:13:42 · 745 阅读 · 0 评论 -
RobotFramework Selenium 中调用js和jquery
在用RFS做自动化测试时,如果调用js和jquery,原创 2014-09-30 09:32:12 · 9267 阅读 · 0 评论 -
js 获取 对对象相对于页面四边的距离
getBoundingClientRect() 这个方法返回一个矩形对象,包含四个属性:left、top、right和bottom。分别表示元素各边与页面上边和左边的距离。 var box=document.getElementById('box'); // 获取元素alert(box.getBoundingClientRect().top);转载 2015-11-18 16:40:01 · 6075 阅读 · 0 评论 -
js 对html的基本操作
js获取某元素的所有属性名var s = document.getElementById("username").attributesss= new String('')for(var i=0;i<s.length;i++){ var txt = s[i].name ss = ss.concat(txt).concat(',') }alert(s转载 2015-11-16 10:17:23 · 349 阅读 · 0 评论 -
js 幽灵js可以用在页面加载计时和页自动化
http://phantomjs.org/ phantomjs这个工具可以做如下事情:LearnD Quick Start D Headless Testing D Screen Capture D Network Monitoring D Page Automation D Inter Process Communica原创 2015-10-15 15:09:24 · 828 阅读 · 0 评论 -
loadrunner 通过 cscript 获取js返回值的思路
@echo off for /f "tokens=*" %%a in ('cscript test.js //nologo') do ( echo 处理结果:%%a) pause转载 2015-07-28 21:59:39 · 1980 阅读 · 0 评论 -
js 单元测试信息收集
今天介绍一下单元测试工具。QWrap的单元测试(unittest)工具,是基于jsspec(http://jania.pe.kr/aw/moin.cgi/JSSpec)的语法来的。其css也是完全照搬jsspec。相对于jsspec,改变有:代码重构、弃用多次运行(仅对未通过的试例)策略、移去对原型的渲染、部分功能增删。原创 2015-03-20 09:19:01 · 304 阅读 · 0 评论 -
jquery ajax方式获取数据的测试桩
data1.json {"name":"Bill Gates","street":"Fifth Avenue New York 666","age":56,"phone":"555 1234567"} js调用 var s = $.ajax({ type: "GET", url: "data1.json", dataType: "json"原创 2015-03-06 11:34:52 · 490 阅读 · 0 评论 -
js 控制 IE 滚动条
简单的例子,控制IE窗口滚动条和DIV中的滚动条,具体可以查看详细信息window.scrollTo(0,document.body.scrollHeight);window.scrollBy(0,50)var divBox = document.getElementById("divBox"); divBox.scrollTop = height;转载 2015-01-05 10:01:51 · 789 阅读 · 0 评论 -
ssh 中 jquery ajax 调用action返回的json数据并传递到页面
$(document).ready( function(){ $("#btnOK").click(function() { $.ajax({ type: "post", url: "/WebContent/testByAction.action"原创 2014-09-18 16:48:11 · 3677 阅读 · 0 评论 -
flot 画图示例
无标题文档function f1(){var a =[[0,10],[1,20],[2,30]];$.plot($("#placeholder"), [a,[["01-12",10],["2-12",20],[3,30], [4, 40]] ], { xaxes: [{ mode: 'time', timeformat: "%m-%d" }],yaxis: { m原创 2014-11-05 16:43:40 · 599 阅读 · 0 评论 -
frame 嵌套 上传jsp
upload " />"> picshow.jsp原创 2014-10-23 13:41:15 · 469 阅读 · 0 评论 -
获取frame中元素的值
window.frames["jbxx"].document.getElementById("test").value 目的是用来把上传转载 2014-10-22 17:59:59 · 2683 阅读 · 0 评论 -
Robot Framework Selenium2Library 自动化测试中点击操作 click element
Comment Click Element xpath=//div[@id='plandiv_dayTimePlan0']/divComment Focus xpath=//div[@id='plandiv_dayTimePlan0']/divComment SWTA.Mouse Down xpath=//div[@id='plandiv_dayTimePlan0']/divComme原创 2014-12-09 10:51:47 · 11035 阅读 · 0 评论