Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. get image properties with javascript [modified]

get image properties with javascript [modified]

Scheduled Pinned Locked Moved ASP.NET
javascripthtmlquestion
2 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    morteza57
    wrote on last edited by
    #1

    Hi, I have a html image in one page like this GetInfo() is javascript function. How i can get image's Location in javascript function? (Compatible with Firefox) thanks.

    M 1 Reply Last reply
    0
    • M morteza57

      Hi, I have a html image in one page like this GetInfo() is javascript function. How i can get image's Location in javascript function? (Compatible with Firefox) thanks.

      M Offline
      M Offline
      morteza57
      wrote on last edited by
      #2

      I found my solution : function GetInfo(img) { SRC=img.src HEIGHT=img.offsetHeight; WIDTH=img.offsetWidth; TopLocation=img.offsetTop; LeftLocation=img.offsetLeft; }

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups