I open my app with a deeplink
myscheme://?param1=value1¶m2=value2
How can I get the value of the parameters? I found different posts that treat this subject but the once I tried works on http links I think, I alwayse get a warning telling me that BlobURL object is not supported yet.
var url = new URL(data);
alert(url.searchParams.get("param1"));
I have tried your example, and it works, with slight adjustment:
let myscheme = 'http://www.example.com/?param1=value1¶m2=value2'
var url = new URL(myscheme);
alert(url.searchParams.get("param1"));
More details can be found here .
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.