GithubHelp home page GithubHelp logo

js_get_url's Introduction

JS_get_url

Emualtor JS/PHP. GET_URL for javascript similar to $_GET on php

#Content

HTML CSS JS

#how to use

The variable 'par' is the parameter master of this code, that's what you want to take these URL's, then this code will catch all you're after the amount you determine the variable 'par', in this case what you see in the code it takes which is the value after '"= example2" and before any &. I used the & because in a php system is more what is separating GETs another, the more you can override this value by the tab you are using.

The code works in any situation, in the example html have trés examples link one early one in the middle and one at the end, the code actually simulates all the php $ _GET do, it's as if you were using $ _GET [example2 ' '], in the case of this example that is in the script.

Everything after the 21 line or after the alert is for testing only is not part of the process in sí, you can change to any css setting you want to change. The alert is for you to test whether a variable is coming where you want, while developing me was very helpful so I let so you can help it, that's why it was reviewed, it is not necessary for the operation of script.

Any questions please contact me, I hope this code will help you a lot.

#Como usar

A variavel 'par' é o parametro mestre desse código, é o que você quer tirar dessas url's, então esse código vai pegar tudo que estiver depois do valor que você determinar na variavel 'par', nesse caso que está vendo no código ele pega o valor que está depois de '"exemplo2=" e antes de qualquer &. Eu utilizei o & porque em um sistema php é oque mais se encontra separando GETs de outro, mais você pode substituir esse valor pelo separador que estiver utilizando.

O código funciona em qualquer situação, no exemplo html temos trés exemplos de link um no início outro no meio e outro no final, o código realmente simula tudo que o $_GET do php faz, é como se você estivesse utilizando $_GET[exemplo2''], no caso desse exemplo que está no script.

Tudo após a linha 21 ou após o alert é somente para teste não faz parte do processo em sí, você pode alterar para qualquer configuração css que queira alterar. O alert serve para você testar se a variavel está chegando onde você quer, durante o desenvolvimento me foi muito útil por isso eu deixei para que possa auxilia-lo, esse é o motivo dele ter sido comentado, ele não é necessário para o funcionamento do script.

Qualquer dúvida entre em contato comigo, tomara que esse código lhe ajude bastante.

#Licence @Renan Pantoja Vilas 2015 Licensed under Apache License Version 2.0, January 2004

js_get_url's People

Contributors

renanpantoja avatar

Stargazers

Afonso Pacifer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.