0

I have a webpage that I want people to fill information out on and then a response emailed to me with that information. Is there a way that I can include the url in the email from that page using html?

I have no clue how to start this. I saw a similar question here: Get current webpage URL

but I don't understand how to turn the src: url to the one of the page I am currently on. It seems like I should be able to reference it, but I am unsure how.

Thanks

Community
  • 1
  • 1
JustBlossom
  • 1,259
  • 3
  • 24
  • 53

2 Answers2

0

See this question. To get the webpage URL with JavaScript, you can use document.URL. You can then use it for what you want.

Community
  • 1
  • 1
CoffeeRain
  • 4,460
  • 4
  • 31
  • 50
0

This is not possible with straight html. You can use Javascript to change the src attribute:

document.getElementById("myElement").setAttribute("src", window.location.href);

In this example, it's assumed that you are attempting to change the src attribute of an element with the id "myElement".

esqew
  • 42,425
  • 27
  • 92
  • 132