Javascript使用小程序

来源:互联网 发布:java注解有什么用 编辑:程序博客网 时间:2024/06/06 09:11

1、LinkButton打开新窗口

<script type="text/javascript">  
    function   openmessagewin(id)   {      
     window.open   ("filename.aspx?ID="+id, "Message", "height=400, width=800, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=yes, status=yes")  
     }    
  </script>

.cs
 LinkButton1.Attributes.Add("onclick", "openmessagewin(" + _id + ")");

本文来自:http://www.cnblogs.com/fanyipeng/archive/2009/06/16/1504273.html

 


 

 

2、鼠标移动到文字上时,怎样让文字改变

 

<p id="p1"><a href="hello.htm" onmouseover="this.old = this.innerHTML;this.innerHTML='welcome';" onmouseout="this.innerHTML=this.old">Hello</a></p>

 

本文来自:http://topic.csdn.net/u/20110111/03/da7ae2a6-4acb-49f9-95d2-43da7c21a1d9.html