• 1 
预览模式: 普通 | 列表

网页在线播放器代码大全

1.avi格式

<object id="video" width="400" height="200" border="0" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA">
<param name="ShowDisplay" value="0">
<param name="ShowControls" value="1">
<param name="AutoStart" value="1">
<param name="AutoRewind" value="0">
<param name="PlayCount" value="0">
<param name="Appearance value="0 value=""">
<param name="BorderStyle value="0 value=""">
<param name="MovieWindowHeight" value="240">
<param name="MovieWindowWidth" value="320">
<param name="FileName" value="file:///D|/work/vod/Mbar.avi">
<embed width="400" height="200" border="0" showdisplay="0" showcontrols="1" autostart="1" autorewind="0" playcount="0" moviewindowheight="240" moviewindowwidth="320" filename="file:///D|/work/vod/Mbar.avi" src="Mbar.avi">
</embed>
</object>

[阅读全文]

LightBox的Alert效果

<input type="button" value="点击这里" onclick="sAlert('测试效果');" />
<script type="text/javascript" language="javascript">
  function sAlert(str){
    var msgw,msgh,bordercolor;
    msgw=400;//提示窗口的宽度
    msgh=100;//提示窗口的高度
    titleheight=25; //提示窗口标题高度
    bordercolor="#336699";//提示窗口的边框颜色
    titlecolor="#99CCFF";//提示窗口的标题颜色
    var sWidth,sHeight;
    sWidth=document.body.offsetWidth;
    sHeight=screen.height;
    var bgObj=document.createElement("div");
    bgObj.setAttribute('id','bgDiv');
    bgObj.style.position="absolute";
    bgObj.style.top="0";
    bgObj.style.background="#777";
    bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
    bgObj.style.opacity="0.6";
    bgObj.style.left="0";
    bgObj.style.width=sWidth + "px";
    bgObj.style.height=sHeight + "px";
    bgObj.style.zIndex = "10000";
    document.body.appendChild(bgObj);
    var msgObj=document.createElement("div")
    msgObj.setAttribute("id","msgDiv");
    msgObj.setAttribute("align","center");
    msgObj.style.background="white";
    msgObj.style.border="1px solid " + bordercolor;
    msgObj.style.position = "absolute";
    msgObj.style.left = "50%";
    msgObj.style.top = "50%";
    msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif";
    msgObj.style.marginLeft = "-225px" ;
    msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px";
    msgObj.style.width = msgw + "px";
    msgObj.style.height =msgh + "px";
    msgObj.style.textAlign = "center";
    msgObj.style.lineHeight = (msgh-titleheight) + "px";
    msgObj.style.zIndex = "10001";
    var title=document.createElement("h4");
    title.setAttribute("id","msgTitle");
    title.setAttribute("align","right");
    title.style.margin="0";
    title.style.padding="3px";
    title.style.background=bordercolor;
    title.style.filter="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);";
    title.style.opacity="0.75";
    title.style.border="1px solid " + bordercolor;
    title.style.height="18px";
    title.style.font="12px Verdana, Geneva, Arial, Helvetica, sans-serif";
    title.style.color="white";
    title.style.cursor="pointer";
    title.innerHTML="关闭";
    title.onclick=function(){
      document.body.removeChild(bgObj);
      document.getElementById("msgDiv").removeChild(title);
      document.body.removeChild(msgObj);
    }
    document.body.appendChild(msgObj);
    document.getElementById("msgDiv").appendChild(title);
    var txt=document.createElement("p");
    txt.style.margin="1em 0"
    txt.setAttribute("id","msgTxt");
    txt.innerHTML=str;
    document.getElementById("msgDiv").appendChild(txt);
  }
</script>

一些浏览器的javascript(有些IE才有效)

  1.   oncontextmenu="window.event.returnvalue=false"   将彻底屏蔽鼠标右键  
  <table   border   oncontextmenu=return(false)><td>no</table>   可用于Table  
   
  2.   <body   onselectstart="return   false">   取消选取、防止复制  
   
  3.   onpaste="return   false"   不准粘贴  
   
  4.   oncopy="return   false;"   oncut="return   false;"   防止复制  
   
  5.   <link   rel="Shortcut   Icon"   href="favicon.ico">   IE地址栏前换成自己的图标  
   
  6.   <link   rel="Bookmark"   href="favicon.ico">   可以在收藏夹中显示出你的图标  
   
  7.   <input   style="ime-mode:disabled">   关闭输入法   

[阅读全文]

iframe 的用法与注意事项

好多同志对 iframe 是如何控制的,并不是十分了解,基本上还处于一个模糊的认识状态.

注意两个事项,ifr 是一个以存在的 iframe 的 ID 和 NAME 值:
&#61548;    document.getElementById(“ifr”);
&#61548;    window.frames[“ifr”];

要想使用iframe内的函数,变量就必须通过第二种方法.因为它取的是一个完整的DOM模型(不知道这样说对不对).第一种方法只是取出了一个OBJECT而已.

如果只想改变iframe的 src 或者 border , scrolling 等 attributes(与property不是一个概念,property是不能写在标签内的,比如:scrollHei

[阅读全文]

基于XML-RPC的BloggerAPI学习

基于XML-RPC的BloggerAPI学习

 Luliang的mail2blog脚本,通过基于XML-RPCBloggerAPI来实现的发布blog的功能。
  BloggerAPI是一套程序接口,用以支持远程操作blog.这个规范现在的版本是1.0,是个试验版本和α版本。但是,规范的研发人员不再对BloggerAPI进一步地开发,他们正在制定一套新的、更稳定的API,新项目的名称为echo.

[阅读全文]

JavaScript Base64编码和解码,实现URL参数传递。

为什么需要对参数进行编码?相信有过开发的经验的广大程序员都知道,在Web中,若是直接在Url地址上传递参数值,若是中文,或者+等什么的就会出现乱码现象,若是数字或者英文的好象没有什么问题,简言之,传递过来的参数是需要进行编码的。
在这里,也许有人会说,为什么不直接用Server.UrlDecode和Server.UrlEncode这两个来进行编码和解码的操作呢?

的确,这两个服务器端对象很好使用,用起来也很方便,但是,若在客户端是HTML的Input,查询的时候页面是HTML或者其他的,反正不是.NET的,那这个对象还可以用吗?


我现在就遇到这样的问题,查询的东东放在页面,而且那个页面我根本不想让他是.aspx结尾的,哈,感觉HTML的挺不错,而且里面的控件也是用HTML对象的。

[阅读全文]

利用JS+CSS实现圆角

为了不用图片实现圆角已经不是一天两天的事情了,IE迟迟不支持CSS3.0 如果要普及3.0估计还得好多年. 但是程序界狂人辈出啊.看看以下的实现方法吧. 呵呵.

http://www.html.it/articoli/niftycube/index.html

悄悄的告诉大家,作者用了很多<b>来进行园角的填充哦,当然这个是用JS输出的.呵呵  嘘~~~ 一般人我不告诉他 (众人:这么喜欢开玩笑,拖出去PK )
  • 1