From aa39391db80dc89752de701a18ff6581d31040fb Mon Sep 17 00:00:00 2001 From: Kevin CHEN <33132228+KevinZonda@users.noreply.github.com> Date: Mon, 6 Sep 2021 11:38:56 +0100 Subject: add syntax highlight (#2321) --- files/pt-br/web/api/url/searchparams/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'files/pt-br/web') diff --git a/files/pt-br/web/api/url/searchparams/index.html b/files/pt-br/web/api/url/searchparams/index.html index 48d5af7416..70e6756f85 100644 --- a/files/pt-br/web/api/url/searchparams/index.html +++ b/files/pt-br/web/api/url/searchparams/index.html @@ -19,7 +19,7 @@ translation_of: Web/API/URL/searchParams

Se a URL da sua página é https://example.com/?name=Jonathan&age=18 você pode parsear os parametros 'name' e 'age' usando:

-
let params = (new URL(document.location)).searchParams;
+
let params = (new URL(document.location)).searchParams;
 let name = params.get("name"); // é a string "Jonathan"
 let age = parseInt(params.get("age")); // é o número 18
-- cgit v1.2.3-54-g00ecf