Free javascript Hosting


param-script.js

Uploaded on Oct 17 2021 04:01 by pit_er

function getParams() {
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const fDate = urlParams.get('od');
const tDate = urlParams.get('do');

var params = [fDate, tDate];

return params;
}

// function checkParams() {
// const params = getParams();

// if (params[0] == null && params[1] == null) {
// return console.log("no params");
// }

// return console.log(params);
// }

function innerParams(){
const params = getParams();

if (params[0] == null && params[1] == null) {
return console.log("no params");
}

document.getElementById("quform_1_18_20f737").value = params[0];
document.getElementById("quform_1_19_20f737").value = params[1];

return console.log("ok");

}

innerParams();

// checkParams();

// const queryString = window.location.search;
// console.log(queryString);
// const urlParams = new URLSearchParams(queryString);
// const fname = urlParams.get('fname')
// document.getElementById("fname").value = fname;

Back to list