Results 1 to 5 of 5
Thread: Javascript - div
Hybrid View
-
21st February 2009 23:39 #1
Javascript - div
, , . :
, div. , <font> , - div-a, . , , ?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>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
-
22nd February 2009 00:01 #2
position, width, height (P2002) ??
font . <font .
document.getElementById(...).style.heigh t.
-
22nd February 2009 13:22 #3
, <font> - , <div> . , height , . , . :
.offsetHeight, , .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>
<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
-
22nd February 2009 13:25 #4
, - . , 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|
-
26th February 2009 20:07 #5Registered User
Join Date: Jul:2005
Location: Sofiq
Posts: 2,798
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>




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in