Results 1 to 5 of 5

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Deleted User 4eRNoBiL's Avatar
    Join Date: Oct:2005
    Location:
    Posts: 739

    Javascript - div

    , , . :
    Code:
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    <script type="text/javascript">
    function asd() {
    
    var divh = document.getElementById('P2002').offsetHeight;
    
        alert(divh +"px");
     }
    </script>
    
    </head>
    <body>
    
    <a href="javascript:asd()"></a>
    <div id="P2002">
    	<font size="+2" face="Monotype Corsiva" style="position:absolute; width:435px; height:15px; text-align:center">
    	<br>asdfjhasjkdfhjkasdfk
    	<br>sjkghjk
    	<br>sdfkdgkjdngjksdndgnksdj
    	<br>sdfgn
    	</font>
    </div>
    </body>
    , div. , <font> , - div-a, . , , ?
    Fujistu Lifebook E756 | Core i7-6500U / 400MHz-3.1GHz | 8 GB DDR4-2133 | Samsung PM871 / 256 GB SSD | 15" 1920x1080 | Manjaro Linux + kernel 4.19

  2. #2
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    position, width, height (P2002) ??
    font . <font .
    document.getElementById(...).style.heigh t.

  3. #3
    Deleted User 4eRNoBiL's Avatar
    Join Date: Oct:2005
    Location:
    Posts: 739
    , <font> - , <div> . , height , . , . :
    Code:
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    <script type="text/javascript">
    function asd() {
    
    var divh = document.getElementById('P2002').offsetHeight;
    
        alert(divh +"px");
     }
    </script>
    
    </head>
    <body>
    
    <a href="javascript:asd()"></a>
    <div id="P2002" style="position:absolute; width:435px; text-align:center;
                           font-family:Monotype Corsiva; font-size:150%">
    	<br>asdfjhasjkdfhjkasdfk
    	<br>sjkghjk
    	<br>sdfkdgkjdngjksdndgnksdj
    	<br>sdfgn
    </div>
    </body>
    .offsetHeight, , .
    <font>. , .
    Fujistu Lifebook E756 | Core i7-6500U / 400MHz-3.1GHz | 8 GB DDR4-2133 | Samsung PM871 / 256 GB SSD | 15" 1920x1080 | Manjaro Linux + kernel 4.19

  4. #4
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    , - . , FONT . XML- , <br> <br />, .
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  5. #5
    Registered User
    Join Date: Jul:2005
    Location: Sofiq
    Posts: 2,798
    Quote Originally Posted by 4eRNoBiL View Post
    , , .
    E div-a e position:absolute; 0px . : width font, width position:absolute; div-a 0px.

    Code:
    <div id="P2002" style="width:435px; text-align:center">
    	<font  size="+2" face="Monotype Corsiva">
    	<br />asdfjhasjkdfhjkasdfk
    	<br />sjkghjk
    	<br />sdfkdgkjdngjksdndgnksdj
    	<br />sdfgn
    	</font>
            
            <font  size="+1" face="Tahoma">
    	<br />asdfjhasjkdfhjkasdfk
    	<br />sjkghjk
    	<br />sdfkdgkjdngjksdndgnksdj
    	<br />sdfgn
    	</font>
    </div>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |