码迷,mamicode.com
首页 > Web开发 > 详细

html5学习测试

时间:2015-02-14 23:48:30      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<!-- 4秒后自动转去相应网址 -->
	<!-- <meta http-equiv="refresh" content="4; http://www.baidu.com/" /> -->
	<title>test output</title>
	<style>
		//body{ background: navy; color: yellow;}
	</style>
</head>
<body>
	<form name="main">
		<h3>output元素,在firefox中支持得很好</h3>
		<output name="result"></output>
		<script>
			document.forms.main.elements.result.value = "Hello中国";
		</script>
	</form>
	<hr>
	<a href="about:blank">baidu</a>
	<script>
		var a = document.links[0];
		a.href="http://www.baidu.com";
		a.protocol = "https";

		//a.setAttribute("href","http://www.163.com");
		a.setAttribute("target","_blank");
	</script>
	<hr>
	<h3>特殊符号</h3>
	10±0.01 <br>
	注册商标® <br>
	度° <br>
	元¥ <br>
	引号" Hello World. "
	<hr>
	<strong>鼠标</strong>移上去显示详细<em>abbr</em>:<abbr title="eXtensible Hyper Text Markup Language">XHTML</abbr>
	<hr>
	<kbd>Enter</kbd>
	<hr>
	<pre>
	<code>
function message(info){
	window.alert(info);
}
	</code></pre>
	<hr>
	<blockquote>
		天才是99%的汗水+1%的天分! 
	</blockquote>
	<hr>
	<table border=1>
		<colgroup span="1" style="width:150px;"></colgroup>
		<colgroup>
			<col span="2" style="width:100px; background:red">
		</colgroup>
		<colgroup>
			<col span="1" style="width:100px; background:#ccff99">
		</colgroup>
		<colgroup span="1" style="width:150px;"></colgroup>
		<thead>x
			<tr>
				<td>1</td>
				<td>2</td>
				<td>3</td>
				<td>4</td>
				<td>4</td>
			</tr>
		<tbody>
		<tbody>
			<tr>
				<td>5</td>
				<td>6</td>
				<td>7</td>
				<td>8</td>
				<td>4</td>
			</tr>
			<tr>
				<td>9</td>
				<td>0</td>
				<td>-</td>
				<td>=</td>
				<td>4</td>
			</tr>
		</tbody>
		<tfoot>
			<tr>
				<td>1</td>
				<td>2</td>
				<td>3</td>
				<td>4</td>
				<td>4</td>
			</tr>
		<tfoot>		
	</table>
	<hr>
	<form action="" name="frmTest">
	tel: <input type="tel"> <br>
	datetime: <input type="datetime"> <br>
	range: <input type="range" min="0" max="10" value="5"> <br>
	color: <input type="color" name="colorSel"> <input type="button" onclick="alert(frmTest.colorSel.value)"> <br>

	optgroup示例: 
	<select name="selOptGrp" id="">
		<optgroup label="娱乐">
			<option value="film">电影</option>
			<option value="film">音乐</option>
		</optgroup>
		<optgroup label="运动">
			<option value="football">足球</option>
			<option value="basketball">蓝球</option>
		</optgroup>
	</select> 
	<br>
	<datalist id="mylist">
			<option value="film">电影</option>
			<option value="film">音乐</option>
			<option value="football">足球</option>
			<option value="basketball">蓝球</option>
	</datalist>
	提示: <input type="text" name="mysport" list="mylist"> <br>
	progress: <progress max="100" value="20"></progress>
	</form>

	<h3>menu test fail:</h3>
	<div style="border:1px solid red; width:400px; height:300px; word-wrap:break-word; word-break:break-all;" draggable="true" contextmenu="mymenu">
		Hello World, This is great!		
		Hello World, This is great!Hello World, This is great!Hello World, This is great!
	</div>
	<menu id="mymenu" type="toolbar" label="someth">
		<li>a</li>
		<li>b</li>
		<li>c</li>
		<li>d</li>
	</menu>
</body>
</html>

 

html5学习测试

标签:

原文地址:http://www.cnblogs.com/wucg/p/4292267.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!