易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net右键弹出上下文菜单

xtreeView.js
---==========================================================
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all
if (ie5||ns6)
var menuobj=document.getElementById("Panel2")
function showmenuie5(e)
{
   
    document.getElementById("url").value = e.srcElement.firstChild.nodeValue;
   
var rightedge=ie5? document.body.clientWidth-event.clientX : window.innerWidth-e.clientX
var bottomedge=ie5? document.body.clientHeight-event.clientY : window.innerHeight-e.clientY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left=ie5? document.body.scrollLeft+event.clientX-menuobj.offsetWidth : window.pageXOffset+e.clientX-menuobj.offsetWidth
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.style.left=ie5? document.body.scrollLeft+event.clientX : window.pageXOffset+e.clientX
//same concept with the vertical position
if (bottomedge<menuobj.offsetHeight)
menuobj.style.top=ie5? document.body.scrollTop+event.clientY-menuobj.offsetHeight : window.pageYOffset+e.clientY-menuobj.offsetHeight
else
menuobj.style.top=ie5? document.body.scrollTop+event.clientY : window.pageYOffset+e.clientY
if(ie5)
    window.event.cancelBubble = true;
else if(ns6)
    e.stopPropagation();
menuobj.style.visibility="visible"
   
return false
}
function hidemenuie5(e){
menuobj.style.visibility="hidden"
}
function highlightie5(e){
var firingobj=ie5? event.srcElement : e.target
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
if (ns6&&firingobj.parentNode.className=="menuitems")
firingobj=firingobj.parentNode //up one node
firingobj.style.backgroundColor="highli


相关文档:

ASP.Net中用C#实现站点计数器用户控件

asax文件:
  <%@ Control Language="c#" AutoEventWireup="false" Codebehind="counter.ascx.cs" Inherits="JiAnWeb.counter" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
  <LINK href="css.css" rel="stylesheet">
  <FONT face="宋体">
  <TABLE id="table_coun ......

Asp.Net 4.0 新特性 系列 之一 从页面标记说起

VS2010在4月份已经正式发布了,Asp.Net 4.0给我带来了一些新的东西。体验一把。
1. 从页面标记<%%>说起
2. Asp.Net 4.0 中可以用自定义的Provider做OutputCache 了
3. SEO增强支持MetaKeywords,和MetaDescription,RedirectPermanant
4. SEO增强之URL Routing
5. 输出更纯净的Html代码,ViewStateMode和ClientI ......

转 ASP.Net 获取文件的路径

一、获取当前文件的路径
1.   System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName
     获取模块的完整路径,包括文件名。
2.   System.Environment.CurrentDirectory
     获取和设置当前目录(该进程从中启动的目录)的完全限定目录。 ......

向 ASP.NET Web 服务器控件添加客户端脚本事件

更新:2007 年 11 月 可以像对 HTML 元素那样,以声明方式向 ASP.NET 网页上的控件添加客户端脚本。或者,如果事件或代码依赖仅在运行时可用的信息,可以通过编程方式向 ASP.NET Web 服务器控件添加客户端脚本事件。 说明: 可以在客户端脚本中通过 ID 引用控件。有关更多信息,请参见 ASP.NET 网页中的客户端脚本。 向 ......

asp.net检测网页特性

代码如下:
System.Web.HttpBrowserCapabilities browser = Request.Browser;
string s = "Browser Capabilities\n"
"Type = " + browser.Type ;
"Name = " + browser.Browser ;
"Version = " + browser.Version ;
"Major Version = " + browser.Ma ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号