Tuesday, 26 September 2017

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

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...