html&js经典技巧

第一个
      权益声明符号“©,注册商标符号-〉“¬
第二个,table
      <table cellspacing="10" border="1" cellpadding="5"><caption>caption content</caption></table>
第三个,无序列表
       <ul>
        <li></li>
    
       </ul>
       有序列表
        <ol>
         <li></li>
        <ol>

第四个,隐藏对象
      与jsp联合获得系统时间<input type="hidden" name="date" value="<%=date%>">

第五个,onsubmit
        <form name = " " methed="post" action=" " onsubmit="return check()">
        .....
  </form>
 <script language="javascript">
   <!-- function check(){
  if(document.form1.barName.value==""){
   alert("输入货物名称");
   document.form1.barName.focus();
   return false;
  }
  
  
     }
   -->
 </script>
第六个,5秒后跳转道index1.jsp
        (1)位置:<head></head>间
        (2)<meta http-equiv="refresh" content="5; url=insex1.jsp">
第七个,框架网页设计,
         <frameset cols="50%,50%">
         <frame src="th1.html" name="w1">
         <frame src="thcon1.html" name="w2">
  </frameset>

 编辑th1.html
  <a href="thcon1.html" target="w2">目录1</a>
  <a href="thcon2.html" target="w2">目录2</a>
  <a href="thcon3.html" target="w2">目录3</a>
第八个,用例子讲述css 的使用
     效果一:给单元格加上效果蒙板,鼠标掠过时清楚显示
     
          1,声明:<link href="img/css.css" rel="stylesheet" type="text/css">
  
          2,filter.css中编辑
            .alpha60 {
     filter: Alpha(Opacity=60);
                                 }
          3,引用:<td align="center" class="alpha60"
    onmouseover="this.className=''"
    onmouseout="this.className='alpha60'"></td>
           

第九个,用例子讲述js的使用
    (1)js代码位置<head></head>或<body></body>之间
    (2)<script language="javascript">
 <!-- 
  today=new Date();                                             
  function initArray(){                                             
  this.length=initArray.arguments.length                                             
  for(var i=0;i<this.length;i++)                                             
  this[i+1]=initArray.arguments[i]  }                                             
  var d=new initArray(                                             
  "星期日",                                             
  "星期一",                                             
  "星期二",                                             
  "星期三",                                             
  "星期四",                                             
  "星期五",                                             
  "星期六");                                             
  document.write(                                             
  "<font color=##000000 style='font-size:9pt;font-family: 宋体'> ",                                             
  today.getYear(),"年",                                             
  today.getMonth()+1,"月",                                             
  today.getDate(),"日",                                             
  d[today.getDay()+1],                                             
  "</font>" ); 
 -->
 </script>

 <script src="img/date.js">
 </script>       
第十个,链接颜色
 <body link="#" vlink="#" alink="#" >
第十一个,锚点(文章快速查看)
   目录
  1 -〉<a href="help.htm #h1">1</a>
  2 -〉<a href="help.htm #h2">2</a>

  1,如何使用本系统<a name="h1"></a>
  2,联系方式<a name="h2"></a>               

你可能感兴趣的:(html&js经典技巧)