Testing an Image's align Property : Image Img : HTML : JavaScript DHTML examples (example source code) Organized by topic

JavaScript DHTML
C++
PHP
JavaScript DHTML Home »  HTML   » [  Image Img  ]   
 



Testing an Image's align Property

Please note that some example is only working under IE or Firefox.

/*
JavaScript Bible, Fourth Edition
by Danny Goodman 

Publisher: John Wiley & Sons CopyRight 2001
ISBN: 0764533428
*/


<HTML>
<HEAD>
<TITLE>IMG align Property</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function setAlignment(sel) {
    document.myIMG.align = sel.options[sel.selectedIndex].text
}
</SCRIPT>
</HEAD>
<BODY>
<H1>IMG align Property</H1>
<HR>
<FORM>
Choose the image alignment:
<SELECT onChange="setAlignment(this)">
    <OPTION>absbottom
    <OPTION>absmiddle
    <OPTION>baseline
    <OPTION SELECTED >bottom
    <OPTION >left
    <OPTION>middle
    <OPTION>right
    <OPTION>texttop
    <OPTION>top
</SELECT>
</FORM>
<HR>
<P>Lorem ipsum dolor sit amet, consectetaur adipisicing elit, 
sed do eiusmod tempor incididunt ut labore et dolore magna 
aliqua. <IMG NAME="myIMG" SRC="http://www.java2s.com/style/logo.png" HEIGHT=90 WIDTH=120>
Ut enim adminim veniam, quis nostrud exercitation 
ullamco laboris nisi ut aliquip ex ea commodo consequat.</P>
</BODY>
</HTML>
           
       
Related examples in the same category
1.  Get the file name specified in the href or src property
2.  Image dynsrc
3.  Low resolution Image src
4.  Image Long Description
5.  Image width Example
6.  Does image download completely
7.  Alternative Information Example
8.  Image align Example
9.  Image 'src' Property
10.  'height' Example
11.  'readyState' Example
12.  'galleryImg' Example
13.  Monitors the load process and the display of picturesHas Download File
14.  Image Animation
15.  Image array
16.  Replace image
17.  An animating image
18.  Mouse in image and out
19.  Scrolling Image
20.  Change the height of an image
21.  Change image
22.  Change image width
23.  Count images in a document
24.  Image Event Handling
25.  Methods and Properties of the Image Object
26.  A Scripted Image Object and Rotating Images
27.  Scripting image.complete
28.  Changing Between Still and Motion Images
29.  Simple Image Replacement
30.  Image Error Finder
31.  Image element
32.  Image Roller MachineHas Download File
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.