線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1119
推到 Plurk!
推到 Facebook!

網頁托拉問題

缺席
aaron8738352
一般會員


發表:13
回覆:7
積分:4
註冊:2003-12-12

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-03-08 10:06:57 IP:140.134.xxx.xxx 未訂閱
各位先進您好~~想請教一下,有關於IE瀏覽器的網頁拖拉功能該如何撰寫??() 請各位先進能指教~~謝謝您
biau
一般會員


發表:25
回覆:32
積分:21
註冊:2003-02-27

發送簡訊給我
#2 引用回覆 回覆 發表時間:2004-03-08 14:57:07 IP:163.19.xxx.xxx 未訂閱
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/contenteditable.asp
biau
一般會員


發表:25
回覆:32
積分:21
註冊:2003-02-27

發送簡訊給我
#3 引用回覆 回覆 發表時間:2004-03-08 15:05:40 IP:163.19.xxx.xxx 未訂閱
要用 ie5.5以上才能RUN     
<HTML>
  <HEAD><TITLE>BaseContainer</TITLE>
  
  <style type="text/css">       .containerStyle  
   { 
        position:absolute; 
        width:0px; height:0px; z-index:2; 
        left: 32px; top: 85px; 
        background-color: #FFFFFF; 
        layer-background-color: #FFFFFF; 
        border: 1px solid #000000; padding:15;
        overflow:hidden;
   }
  .containershadow  
  { 
        position:absolute; 
        width:0px; height:0px; z-index:1; 
        left: 0px; top: 0px; 
        background: #000000; border: 1px solid #000000; 
        FILTER: progid:DXImageTransform.Microsoft.CrBlur(
                PixelRadius=3,
                MakeShadow=true,
                ShadowOpacity=.30);}   
                
   .toolbar  
   { 
        position:absolute; 
        width:600px; height:30px; z-index:3; 
        left: 10px; top: 10px; 
        background-color: #FFFFFF; 
        background:lightskyblue; 
        filter:progid:DXImageTransform.Microsoft.Gradient(
        endColorstr='#99CCFF', startColorstr='#ffffff', gradientType='0');        
        layer-background-color: #FFFFFF; 
        border: 1px solid #000000; padding:15;
        overflow:hidden;
   }                
/*##########################################################################################
//
//                        Galley_Style
//
//##########################################################################################*/
.Galley_Style 
{
         position:absolute; 
        width:0px; height:0px; z-index:1; 
        top: 0px; left: 0px; 
        background-color: #999999; 
        border-right:2px solid  #99CCFF; 
        border-top:2px solid #333366;  
        border-left:2px solid #333366; 
        border-bottom:2px solid #99CCFF;}
}    .GalleyTEXTStyle 
{
         position:absolute; 
        width:0px; height:0px; z-index:2; 
        top: 0px; left: 0px; 
        background-color: #FFFFFF; 
        background-color: palevioletred
        layer-background-color: #FFFFFF;             background:lightskyblue; 
        filter:progid:DXImageTransform.Microsoft.Gradient(
        endColorstr='#ffffff', startColorstr='#99CCFF', gradientType='0');
        
        border: 1px solid #000000; padding:15;
}    .GalleyGRAPHICStyle 
{
         position:absolute; 
        width:0px; height:0px; z-index:2; 
        top: 0px; left: 0px; 
        background-color: #FFFFFF; 
        background-color: palevioletred
        layer-background-color: #FFFFFF;             background:lightskyblue; 
        filter:progid:DXImageTransform.Microsoft.Gradient(
        endColorstr='#ffffff', startColorstr='#99CCFF', gradientType='0');
        
        border: 1px solid #000000; padding:15;
}    .GalleySOUNDStyle 
{
         position:absolute; 
        width:0px; height:0px; z-index:2; 
        top: 0px; left: 0px; 
        background-color: #FFFFFF; 
        layer-background-color: #FFFFFF; 
        border: 1px solid #000000; padding:15;
}        .GalleyANIMATIONStyle 
{
         position:absolute; 
        width:0px; height:0px; z-index:2; 
        top: 0px; left: 0px; 
        background-color: #FFFFFF; 
        layer-background-color: #FFFFFF; 
        border: 1px solid #000000; padding:15;
}    .GalleyMOVIEStyle 
{
         position:absolute; 
        width:0px; height:0px; z-index:2; 
        top: 0px; left: 0px; 
        background-color: #FFFFFF; 
        layer-background-color: #FFFFFF; 
        border: 1px solid #000000; padding:15;
}      </style>
  
  
  
       
       var defult_width=0;
       var defult_height=0;       
       var defult_X_POS=0;              
       var defult_Y_POS=0;                     
       
var gsCurrentControlSet = null;
<!-- These variables are used to dynamically assign IDs to inserted content -->
var giLastImg = '1';
var idLastTxt = '1';       
       
       var offset=0;                                function ContainerInit(value1,value2,value3,value4,value5)
       {
           
            defult_X_POS=value1;              
            defult_Y_POS=value2;              
            defult_width=value3;
            defult_height=value4;       
       
       
            offset=value5;        
            init();      
       }             
       
       function setSize()
       {
           //var test="container_1";
              container_1.style.width=this.container_width;           
           container_1.style.height=this.container_height;         
             
       }             
       
       function setPos()
       {
              container_1.style.left=this.container_left;           
           container_1.style.top=this.container_top;                    
       }                                   function container(container_left,
                          container_top,
                          container_width,
                          container_height
                          )
       {
         this.container_left=container_left; 
         this.container_top=container_top;          
         this.container_width=container_width;          
         this.container_height=container_height;                     this.setContainerSize=setSize;
         this.setContainerPos=setPos;                    }    
       
              function showdow(showdow_left,
                          showdow_top,
                          showdow_width,
                          showdow_height) 
       {
         this.showdow_left=showdow_left; 
         this.showdow_top=showdow_top;          
         this.showdow_width=showdow_width;          
         this.showdow_height=showdow_height;        
         
         containershadow.style.width=this.showdow_width;           
         containershadow.style.height=this.showdow_height;                  
         
         containershadow.style.left=this.showdow_left;           
         containershadow.style.top=this.showdow_top;                  }             
function  getElement(){          srcElement=window.event.srcElement;
      //alert("  windows.event.srcElement=" srcElement "  ");
      //alert("  tagname=" srcElement.tagName "  "); 
      alert("  ID=" srcElement.id "  "); 
      //alert("  Class=" srcElement.className "  ");     }           
       function init() 
       {
       
                    //Container                      
             Container1=new container(defult_X_POS,defult_X_POS,defult_width,defult_height);
             Container1.setContainerPos(defult_X_POS,defult_Y_POS);                          
             Container1.setContainerSize(defult_width,defult_height);
             
             showdow1=new showdow(defult_X_POS offset,defult_X_POS offset,defult_width,defult_height);
             
          
       }       
       
//##################################GalleyI       
//##################################       
//##################################                  function GalleyInit(val1,val2,val3,val4) 
       {
           //alert("GalleyInit...");
              Galley.style.left=val1;           
           Galley.style.top=val2;          
                Galley.style.width=val3;           
           Galley.style.height=val4;         
           
           setGalley_Child_Style(Galley.style.left,
                                Galley.style.top,
                                Galley.style.width,
                                Galley.style.height); 
     
       }
       
       function setGalley_Child_Style(parentLeft,parentLeft,parentWidth,parentHeight){               //alert(  Galley.all.length);   rerurn the NUM of Galley,Gallet id the layer's name
           var offset=5                  Galley_TEXT.style.left=10;           
           Galley_TEXT.style.top=60;          
                Galley_TEXT.style.width=90;           
           Galley_TEXT.style.height=90;                                    Galley_GRAPHIC.style.left=10;           
           Galley_GRAPHIC.style.top=160;          
                Galley_GRAPHIC.style.width=90;           
           Galley_GRAPHIC.style.height=90;   
           
              Galley_SOUND.style.left=10;           
           Galley_SOUND.style.top=260;          
                Galley_SOUND.style.width=90;           
           Galley_SOUND.style.height=90;    
           
              Galley_ANIMATION.style.left=10;           
           Galley_ANIMATION.style.top=360;          
                Galley_ANIMATION.style.width=90;           
           Galley_ANIMATION.style.height=90;    
           
              Galley_MOVIE.style.left=10;           
           Galley_MOVIE.style.top=460;          
                Galley_MOVIE.style.width=90;           
           Galley_MOVIE.style.height=90;                                     
           
           
       } 
function TextToolBar(){
  
    //var oNode=document.createElement("div");    
    //oNode.id = 'TextToolBar';
    imgSrc=new Array(50);    
    imgSrc[0]='images/toolbar/UI_fontcolor.gif';        
    imgSrc[1]='images/toolbar/UI_undo.gif';        
    imgSrc[2]='images/toolbar/UI_redo.gif';        
    imgSrc[3]='images/toolbar/UI_bold.gif';        
    imgSrc[4]='images/toolbar/UI_italic.gif';        
    imgSrc[5]='images/toolbar/UI_underline.gif';        
    imgSrc[6]='images/toolbar/UI_form-copy.gif';        
    imgSrc[7]='images/toolbar/UI_tool-cut.gif';                                    
    imgSrc[8]='images/toolbar/UI_fontcolor.gif';                                                for (i=0;i<8;i  )
    {
         var         
         //oNode.src='images/toolbar/UI_fontcolor.gif';    
         oNode.src=imgSrc[i];        
         var tmpID='tool_' i;
         //tool_1.insertBefore(oNode);
         ToolBar.insertBefore(oNode);
         oNode.style.position='absolute';
         oNode.style.top=5;    
         oNode.style.left=0 30*i;        
    }
}    function InsertText() {
    container_1.unselectable = "off";
    container_1.contentEditable='true';
    document.execCommand("2D-Position", true, true);
    document.execCommand("MultipleSelection", true, true);
    document.execCommand("LiveResize", true, true);
    
    var 
    container_1.insertBefore(oNode);          idLastTxt  ;
    var iTempCount = "text"   idLastTxt;
    oNode.id = iTempCount;
            oNode.style.fontFamily="新細明體";
    oNode.style.position='absolute';    
    oNode.style.top=100;    
    oNode.innerText='在此輸入文字';        oNode.style.position='absolute';
    
    <!-- Set the new text as the active element for editing. -->
    oNode.setActive()
}           function InsertGraphic(){        alert("I'll create Graphic here...");
    container_1.unselectable = "off";
    container_1.contentEditable='true';
    document.execCommand("2D-Position", true, true);
    document.execCommand("MultipleSelection", true, true);
    document.execCommand("LiveResize", true, true);        var 
    container_1.insertBefore(oNode);
    //oNode.src='oImgSrc';
    oNode.src='images/humanframe.jpg';
    giLastImg  ;
    //var iTempCount = oImgId   giLastImg;
    var iTempCount =giLastImg "";
    oNode.id = iTempCount;
    oNode.style.position='absolute';        <!-- Set the new image as control selected for resizing/repositioning -->    
    var oControlRange = document.body.createControlRange();
    oControlRange.add(oNode);
    oControlRange.select();    }    function dispatch()
{
    //alert("I'll dispatch event..");
    srcElement=window.event.srcElement;
    alert("  I get event ID=" srcElement.tagName "  "); 
}        
  
  
  </HEAD>
  
<BODY  
       GalleyInit(620,10,150,540)">      <!--工具列區-->
<!--
-->
<!--編輯區-->
<!--素材區-->
試題素材,使用滑鼠左鍵點選下方媒體分類
圖片
聲音
動畫
影片
</BODY> </HTML>
aaron8738352
一般會員


發表:13
回覆:7
積分:4
註冊:2003-12-12

發送簡訊給我
#4 引用回覆 回覆 發表時間:2004-03-10 12:25:16 IP:140.134.xxx.xxx 未訂閱
biau大大,不好意思唷!! 我想問的問題可能是我問的不好 我想問的是該如何利用BCB 來寫出一個網頁拖拉的功能利用form1的一個按鈕來控制網頁的拖拉 感謝您的指教
系統時間:2024-05-10 9:24:17
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!