Do you want to make dynamic webpage using java script then you can go with parameterized URL that will change everything in your page on runtime and that depend upon you. So you can go with this trick to make pages in one page.
Table of Contents
What Are URL Variables?
Url variables allow developers to pass multiple values from one page to another in order to display different results every time the same page is loaded. This saves the developer from having to make hundreds of pages which are exactly the same. This is mainly because doing so wouldn’t be very realistic or good for any budget.
www.example.com/?id=netzspot
So the upper URL is parameterized with variable id
and its value is netzspot
. You can change variable but have to edit JavaScript.
Features:
1.) Pure JavaScript Added.
2.) No JQuery File.
3.) You Can Garb Variables From URLs.
4.) Simple And Fast Loading Code.
5.) Can Work With Any Browser.
How To Add In A WebPage?
1.) Just Go To Your “Web Page File”.
2.) Now “Copy” The Below Codes And “Paste” It To There Positions.
3.) “Save” It, Now You Are Done.
<script type='text/javascript'> //<![CDATA[ function getUrlVars() { var vars = {}; var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { vars[key] = value; }); return vars; } var theme = getUrlVars()["id"]; document.write('<object id="demoframe" data="http://'+theme+'.blogspot.com" type="text/html" ></object>'); //]]> </script>
Customization:
1.) Edit Your JavaScript As Per Your Requirements. Rest JavaScript Is Ok For General Us. If You Are Pro, Then You Can Do Any Thing.
Last Words:
That’s all we have. If you have any problem with this code in your template then feel free to contact us with full explanation of your problem. We will reply you as time allow to us. Don’t forget to share this with your friends so they can also take benefit from it and leave your precious feedback in our comment form below. Happy blogging, See you in next article…
Fanstestic Tutorial Admin, It is very Helpful for using JavaScript.
Welcome here and thanks for liking our code.
Thanks for publishing such a informative tutorial it help a lot in my future projects.
Welcome here and thanks for liking our code.
people do not share their knowledge regarding JavaScript. thanks to share all of this information with us.
Welcome here and thanks for reading our article and sharing your views.