Base-Jsp-2-HTML参考[1]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

HTML、JavaScript、css虽然很简单,但使用过程中,总会因为遗忘部分语法而在网络中四处奔波查找,趁此闲时,做一个“所见即所得”的HTML参考,以备以后查找。

包括HTML、JavaScript、css的主要语法参考,使用时可以将该内容拷贝,另存为html文件,看取效果,拷贝所需

<html>
<head>
  <!--定义网页中所有链接的基本URL-->
 <base href="http://127.0.0.1:8080"/>
 <!--meta添加网页不显示的信息,可被搜索引擎使用-->
 <meta http-equiv="reply-to" content="dudu@126.com"/>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 <meta name="author" content="dudu"/>
 <meta name="copyright" content="copyright 2005,AiYu"/>
 <!--设置页面过去时间,形式为格林威治时间-->
 <meta name="expires" content="Mon,11 October 2005 08:00:00 GMT"/>
 <!--使页面缓存失效-->
 <meta name="pragma" content="no-cache"/>
 <!--设置允许搜索引擎抓取页面, 不允许抓取,应设为none-->
 <meta name="robots" content="all,follow"/>
 <!--定时自动刷新页面,50秒后跳转到sohu文首-->
 <!--meta http-equiv="refresh" contents="5;url=news.sohu.com.cn"/-->
</head>

<body bgcolor="blue" link="green" alink="orange" vlink="red">
 <!--该处的链接相对与http://127.0.0.1:8080-->
 <!--如果一个URL包含了协议,那么基本值将被忽略-->
 <!--a href="index.html">index</a-->
<br>
<pre>
css example
<!--选择器:由样式定义的一种特殊的标志符号
定义样式:首先必须列出选择器,然后在一对括号之间列出所有的样式限制和标准
用冒号:分隔样式限制和样式标准,用分号分隔独立的样式限制和样式标准
例:h1{color:red;text-align:center},这里h1是选择器
加入样式定义有3中方法:
 1>作为外部文件:样式表可以通过<link>标识符看到,文件名应为.csss
  <link rel="stylesheet" type="text/css" href="external.css"/>
  rel:指明外部文件是一种样式表,应被设为styllesheet
  type:为外部文件定义MINE类型,应用设为text/css
 2>嵌入网页中:使用闭合的<style>标识符,这些标识符可以被放置在<head>标识符中
  <style>
   p first{color:red}
   p second{color:blue}
  </style>
  <p class="first">
  <p class="second">
 3>内联:样式表可被包含在具有style属性的单一标识符里
  <h1 style=""color:blue">
将样式运用在特定的文字:1><div>标识:一般用于大段文字,有点类似<p>,并且可以包含<align>
           2><spin>标识:一般用于小段文字
-->
</pre>
<pre>
form example
<!--form标记不能嵌套,每一对form标记必须独立于所有其他的form标记而存在-->
<!--get方法将数据放在URL的末尾转送给服务器,post方法将表单数据作为HTTP请求的一部分传给服务器-->
<!--可以将表单结果发送大E-mail,在action中使用mailto:-->
<form action="mailto:pingnet@126.com" method="post">
 <!--点击submit按钮,数据发送给action属性所指定的URL-->
 <button name="send" type="submit">submit</button>
 <!--点击reset按钮,清除索引文本域并且将所有其他的表单元素复位-->
 <button name="reset" type="reset">reset</button> 
 <label tabindex="1">label:
 <!--文本域,size属性:设置文本域的宽度;maxlength属性:设置用户可以输入一个文本域中的最大字符个数,默认不限制字符个数-->
 <input type="text" name="tt" value="enter something" readonly="yes" size="20" maxlength="20" tabindex="2"/>
 <input type="password" name="pwd" value="dudutu" readonly="yes" size="20" maxlength="20" tabindex="3" disabled="disabled"/>
 </label>
 <!--textarea的wrap属性:默认所有文本保持在一行,如果设置为soft(virtual),则会包装文本,但文仍然按照一行的格式传给服务器,
 如果设置为hard(physical),则将换行符也发送给服务器,文本域大写不收浏览器窗口大小限制。
 textarea name="info" rows="1" cols="2" readonly="yes">
    he he
 <textarea-->
 <input type="checkbox" name="genre" value="drama"/>drama
 <input type="checkbox" name="genre" value="comedy" checked/>comedy
 <input type="checkbox" name="genre" value="romance"/>romance 
 <!--如果没有一个<input>标记包含checked属性,那么没有任何收音机按钮在初始时被选中-->
 <input type="radio" name="price" value="6"/>$6
 <input type="radio" name="price" value="8"/>$8 
 <input type="radio" name="price" value="9" checked/>$9 

本文关键:Base-Jsp-2-HTML参考
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top