Wednesday, 3 August 2016

JavaScript: How can I get data for the function from the URL?

I started learning JS 2 days ago.
I downloaded an algebra calculator and inserted it into my webpage. Here is the full code:


















The script returns prime factors of 3+3 or 6 (var textToBeExecuted = 'factor(3+3)'), but what I need is to evaluate expressions taken from the URL (example: /?input=3%B54 means 3+4 and returns 7). How can I do this? Please help!

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...