Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body onLoad="runScript()">
- <h1>TTS script</h1>
- <script type="text/javascript" src="jquery-3.2.1.min.js"></script>
- <script type="text/javascript" src="haniilinkedlist_1.js"></script>
- <script type="text/javascript">
- function runScript()
- {
- var paramval = getURLParameter("q");
- var testList = new LinkedList();
- document.getElementById('demo').innerHTML = testList.say("test text");
- if(!paramval)
- {
- window.location.hash = "#queryparamnotparsed";
- return;
- }
- window.location.hash = "#" + paramval;
- }
- function getURLParameter(name)
- {
- // From stackoverflow.com/questions/11582512
- var regex = new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)');
- return decodeURIComponent((regex.exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null;
- }
- </script>
- <p id="demo"></p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment