We are creating an image carousel, it displays clickable thumbnails, when clicked, displays the actual picture That's why we need the URL to appear in HTML. Since there is no "real image URL" attribute defined in the IMG tag, we thought we could create a thumbnail URL like this: How is this valid W3C? Any object is valid as the But it can be unnecessarily complex. As you are working with client-side javascript, you can include URLs in a JavaScript array or object, put them anywhere in the HTML markup. For example, you can use the thumbnail image url as the property name and full image URL such as this value, such as And then you will use this object when lifting the full image URL when a thumbnail is clicked. For a more robust solution, which will work even when Javascript is disabled, you have to generate code server-side, / thumb.png? AltUrl = actualImageUrl.png . The server does not care about the real image URL QuickString Ultimate and we can use Javascript and can parse the scrap attribute and locate the actual image URL.
src attribute value, XFLL Meaning for "valid" in meaning (a formal thing) It is otherwise true that there is a query in this type of value and use it in client-side scripting.
var fullImage = {'thumb.png': ' ActualImageUrl.png ', ...}
a elements around
img Element must be generated.
Comments
Post a Comment