简体   繁体   中英

how to pass 2 links in single href tag

I have 2 html pages, movies.html and single.html. In movies.html i have added list of movies, clicking on any movie will take us to single to html along with movie link. I have pasted the code below for better understanding.

<a href="single.html?movieLink=https://drive.google.com/u/0/uc?export=download&confirm=6KcH&id=1oezcBrXr8b-ATkIGD1I9ZQakPP9VX_5W">

Assume the movieLink given redirect to single.html and will start downloading the movie directly. For getting the link in next page i have written a java script code.

But what I want is that I want to redirect the page to single.html, there I have given 2 options 720px and 1080px. After clicking on the resolution needed it should start to download the specific file.

which means I have to pass 2 href links from the movie.html page, how can i do that?

So your URL will be

single.html?param1=linkone&param2=linktwo

and then you can use these two as functions to get the two parameters.

var param1 = getParameterByName('param1'); //return linkone
var param2 = getParameterByName('param2'); //return linktwo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM