Wednesday, July 3, 2019

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

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...