Skip to content

Instantly share code, notes, and snippets.

@easonhan007
easonhan007 / start_browser.rb
Created May 10, 2013 06:29
使用ruby及selenium-webdriver启动ie浏览器
require 'selenium-webdriver'
Selenium::WebDriver.for :ie
@easonhan007
easonhan007 / start_browser.py
Created May 10, 2013 06:57
使用python+selenium webdriver启动浏览器
from selenium import webdriver
webdriver.Ie()
@easonhan007
easonhan007 / rspec_assert.rb
Last active December 17, 2015 04:49
rspec断言
a = true
a.should be_true
a = 1
a.should eq(1)
a.should eql(1)
a = 'abc'
a.should include('a')
a.should include('b')
@easonhan007
easonhan007 / basic.html
Last active December 17, 2015 05:59
最简单的html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>我的第一个html文档</title>
</head>
<body>
<p>你好,html</p>
</body>
</html>
@easonhan007
easonhan007 / basic_tag.html
Created May 12, 2013 02:14
最基本的html标签
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>基本的html标签</title>
</head>
<body>
<h2>标题</h2>
<p>段落</p>
<a href="#">链接</a>
<a href="javascript:;">链接</a>
@easonhan007
easonhan007 / table.htm
Created May 12, 2013 03:43
最简单的表格
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>最简单的表格</title>
</head>
<body>
<h3>简单的表格-3行3列</h3>
<table>
<tr>
<td>cell1</td>
@easonhan007
easonhan007 / table_with_head.htm
Created May 12, 2013 03:55
有表头的表格
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>有表头的表格</title>
</head>
<body>
<h3>有的表格-3行3列</h3>
<table border >
<thead>
<th>姓名</th>
@easonhan007
easonhan007 / iframe.htm
Created May 12, 2013 07:28
内嵌框架
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>iframe</title>
</head>
<body>
<h3>内嵌框架</h3>
<iframe src="http://www.baidu.com/" width="800" height="600"></iframe>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>inline style</title>
</head>
<body>
<p style="color:red" >昔人已乘黄鹤去,此地空余黄鹤楼,黄鹤一去不复返,白云千载空悠悠。</p>
<p style ="color:blue">晴川历历汉阳树,芳草萋萋鹦鹉洲。日暮乡关何处是,烟波江上使人愁。</p>
</body>
</html>
@easonhan007
easonhan007 / display.htm
Created May 12, 2013 08:53
js控制显示和隐藏
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>显示和隐藏</title>
<script type="text/javascript">
function show(){
document.getElementById('show').style.display = "block"
}
</script>
</head>