Google 搜索提示

一月 23, 2007

(0) 评论

今天发现Google.cn加了新的功能,用起来不错

google_search_tip

以后找东西可以看一下,找些相关关键字可以得到更多结果

google_search_tip2

分类: Ajax

标签: , ,

flash 按钮弹出图片自适应窗口

一月 20, 2007

(0) 评论

先将以下JS代码放入HTML文件

<SCRIPT>
var imgObj;
function checkImg(theURL,winName){
 if (typeof(imgObj) == "object"){
  if ((imgObj.width != 0) && (imgObj.height != 0))
   OpenFullSizeWindow(theURL,winName, imgObj.width,imgObj.height);
  else
   setTimeout("checkImg('" + theURL + "','" + winName + "')", 100)
 }
}
 
function OpenFullSizeWindow(theURL,winName,width,height) {
 var aNewWin, sBaseCmd;
 sBaseCmd = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,top=" + (screen.height/2 - height/2) + ", left=" + (screen.width/2 - width/2)+",";
 if (width == null || width == ""){
  imgObj = new Image();
  imgObj.src = theURL;
  checkImg(theURL, winName)
 }else{
  newwin=window.open('about:blank','',sBaseCmd+'width='+width+',height='+height);
  newwin.document.write('<body leftmargin=0 topmargin=0><img id="img1" src='+theURL+'>'); 
  newwin.focus();
 }
}
</SCRIPT>

用以下代码在FLASH按钮中调用就可以了

on(release){
    getURL("javascript:OpenFullSizeWindow('images/sh2br-bath.jpg')");
}

分类: flash

标签: ,