URL Parameter Pointing to HTML Element Value

29 Views Asked by At

I was wondering if it's possible to reference the value of an html element through a URL parameter?

A use case for this would be if I want to link to something another website was linking to, like a google drive or drop box download link. By embedding a link within a link like this I can send someone a download link with some inherent sense of trust that it's not malicious if the recipient now knows the download link was posted by the owner of a specific website.

There could be more uses for this as well but that's my particular use case right now.

Haven't been able to find a way to do this yet, and actually don't think this possible, but wanted to double check by asking here first.

I know you can reference a particular spot on a page by using the hashtag sign at the end of a url, like this https://something.com/#element-name-x

So what I guess I'm looking for is something like if an <a> tag has an id/name of "where-to" and an href value of "wherever.com" I'd be looking to do something like <a href="https://somethingelse.com/#where-to{href}">Click the Link</a>, where clicking "Click the Link" at something.com wouldn't take you to somethingelse.com#where-to but it would go directly to wherever.com

0

There are 0 best solutions below