1.文本框焦点问题  
onBlur:当失去输入焦点后产生该事件  
onFocus:当输入获得焦点后,产生该文件  
Onchange:当文字值改变时,产生该事件  
Onselect:当文字加亮后,产生该文件  
  
<input type="text" value="mm" onfocus="if(value=='mm) {value=''}" onblur="if  
(value=='') {value='mm'}">点击时文字消失,失去焦点时文字再出现  
  
  
2.网页按钮的特殊颜色  
<input type=button name="Submit1" value="郭强" size=10 class="s02"  
  
style="  
  
3.鼠标移入移出时颜色变化  
<input type="submit" value="找吧" name="B1" onMouseOut=this.style.color="blue"  
  
onMouseOver=this.style.color="red"  class="button">  
  
4.平面按钮  
<input type=submit value=订阅 style="border:1px solid :#666666; height:17px; width:25pt; font-size:9pt;  
  
color:#666666" name="submit">  
  
5.按钮颜色变化  
<input type=text name="nick"  style="border:1px solid #666666;  font-size:9pt;  height:17px;  
  
color:#ff6600" size="15" maxlength="16">  
  
6.平面输入框  
<input type="text" name="T1" size="20" style="border-style: solid; border-width: 1">  
  
7.使窗口变成指定的大小  
<script>  
window.resizeTo(300,283);  
</script>  
  
8.使文字上下滚动  
<marquee direction=up scrollamount=1 scrolldelay=100 onmouseover='this.stop()' onmouseout='this.start()'  
  
height=60>  
<!-- head_scrolltext -->  
<tr>  
<td>  
共和国  
</table>        <!-- end head_scrolltext -->  
</marquee>  
  
9.状态栏显示该页状态  
<base onmouseover="window.status='网站建设 http://www.webmake.cn/' ;return true">  
  
10.可以点击文字实现radio选项的选定  
<br>  
    <input type="radio" name="regtype" value="A03" >  
  
19.打印页面  

<a class="content" href="javascript:doPrint();">打印本稿</a>

  
  
20.可以直接写html语言  
document.write("");  
  
21.改变下拉框的颜色  
<select name="classid"  
  
onChange="changelocation(document.myform.classid.options[document.myform.classid.selectedIndex].value)" 
  
size="1" style="color:#008080;font-size: 9pt">  
  
22.转至目标URL  
window.location="http://guoguo"  
  
23.传递该object的form  
UpdateSN('guoqiang99267',this.form)  
function UpdateSN(strValue,strForm)  
{  
  strForm.SignInName.value = strValue;  
  return false;  
}  
  
24.文字标签  
<label for="AltName4"><input name="AltName" type="RADIO" tabindex="931"  >  

<a class="content" href="javascript:doPrint();">打印本稿</a>



20.可以直接写html语言 
document.write(""); 

21.改变下拉框的颜色 
<select name="classid" 

onChange="changelocation(document.myform.classid.options[document.myform.classid.selectedIndex].value)" 

size="1" style="color:#008080;font-size: 9pt"> 

22.转至目标URL 
window.location="http://guoguo" 

23.传递该object的form 
UpdateSN('guoqiang99267',this.form) 
function UpdateSN(strValue,strForm) 

  strForm.SignInName.value = strValue; 
  return false; 


24.文字标签 
<label for="AltName4"><input name="AltName" type="RADIO" tabindex="931"  ; 

//--> 
</SCRIPT> 
<BODY> 
<text id=guoguo value=ga> 
<a href=# onmouseover=showme() onmouseout=hidme() onmousemove=showme() son=hint>dfdfd</a> 


  <h5><b><font size="4" color="#FF0000">HTML中的XML数据岛记录编辑与添加    </font></b></h5> 
  </TD></TR></Table> 
  <HR> 
  酒店名称:<input type=text datasrc=#theXMLisland DataFLD=NAME size="76"><BR> 
  地址:<input type=text datasrc=#theXMLisland DataFLD=Address size="76"><BR> 
  主页:<input type=text datasrc=#theXMLisland DataFLD=HomePage size="76"><BR> 
  电子邮件:<input type=text datasrc=#theXMLisland DataFLD=E-Mail size="76"><BR> 
  电话:<input type=text datasrc=#theXMLisland DataFLD=TelePhone size="76"><BR> 
  级别:<input type=text datasrc=#theXMLisland DataFLD=Grade size="76"><HR> 
  <input >


<SCRIPT LANGUAGE="JavaScript"> 
<!-- 
function haha() 

clipboardData.setData("Text",a1.value); 
aa.innerText=clipboardData.getData("Text"); 

//--> 
</SCRIPT> 
</BODY>// 

226.获得对象类型 
switch (object.constructor){ 
   case Date: 
   ... 
   case Number: 
   ... 
   case String: 
   ... 
   case MyObject: 
   ... 
   default: 
   ... 
}// 


227.图片加载失败时重新加载图片 
<img src="aa.gif" onerror="this.src='aa.gif'">// 

228. 
//font_effect.htc 
<PUBLIC:ATTACH EVENT="onmouseover" ONEVENT="glowit()" /> 
<PUBLIC:ATTACH EVENT="onmouseout" ONEVENT="noglow()" /> 
<SCRIPT LANGUAGE="JScript"> 
//定义一个保存字体颜色的变量 
var color; 
function glowit() 

color=element.style.backgroundColor; 
element.style.backgroundColor='white' 

function noglow() 

  element.style.backgroundColor=color 

</SCRIPT> 

//abc.css 
tr{behavior:url(font_effect.htc);} 

229.可以通过css和htc改变表格的颜色,仅IE支持 
//xxx.html 
<link rel="stylesheet" type="text/css" href="abc.css"> 
<TABLE border='1'  > 
<!-- 
setTimeout('window.close();', 10000); //60秒后关闭 
// --> 
</script> 
本页10秒后自动关闭,请注意刷新页面

相关文章:

  • 2021-08-14
  • 2021-11-13
  • 2022-02-20
  • 2021-06-25
猜你喜欢
  • 2021-10-10
  • 2021-11-24
  • 2021-07-31
  • 2021-11-03
  • 2021-05-19
相关资源
相似解决方案