var imgUrl = document.getElementById("<%= backUrl.ClientID %>").value;
However this throws up the following error when I try to run my app on SP.
Sorry, there was a problem with bannerSlide. For support, please contact the developer. An error occurred during the processing of /sites/dev/bannerSlide/Pages/test.aspx. Code blocks are not allowed in this file.
Most online solutions seem to point towards modifying a web file but I don't think this is possible with SharePoint Online (Office 365).
Any help would be greatly appreciated, thanks.