3
I’m having second thoughts on script
down below:
function getURLParam(name) {
var regex = "[\\?&]"+name+"=([^&#]*)";
//mais código
return unescape(results[1]);
I’m new to javascript
, I can’t understand what that is:
return unescape(results[1]);
- What that part does ?
- Why did you need to use this ?
So what say he will take the second element of the array? but I do not know what he will do with that return...
– Aline
@gonz I also do not know because I have no idea what code you have :) If you put this in the question I may help more. The function name
getURLParam
hint. Have any idea why this function exists in your code?– Sergio
It takes data from the url, as an example:
?text=impressao&port=LPT1
. And this javascript function sends to the java applet to handle the received data.– Aline
@gonz already figured out what you were looking for? For example in this example you put, making
var porta = getURLParam('port');
this variableporta
will receive the valueLPT1
.– Sergio