Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"GET Method"
Bootstrap 3.1.0 Snippet by
muhittinbudak
3.1.0
jQuery
Preview
HTML
CSS
JS
View Full Screen
Fork
Fork this
180
 
0 Fav
Post to Facebook
Tweet this
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <body> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Strait"> <div class="container" style="font-family: 'Strait', sans-serif;"> <h2 class="text-center">GET Parametrelerini Okuma</h2> <div class="row"> <div class="col-xs-6 col-md-6 col-sm-6" style="border-right-style:solid;border-width: 1px;"> <strong><input style="border-color:#00575A;" id="alan1" name="alan1" class="form-control input-lg" placeholder="value 1" required=""></strong> </div> <div class="col-xs-6 col-md-6 col-sm-6"> <strong><input style="border-color:#80008A;" id="alan2" name="alan2" class="form-control input-lg" placeholder="value 2"></strong> </div> </div> <hr> <div id="param1" class="param-box bg-primary text-white"></div> <div id="param2" class="param-box bg-success text-white"></div> <div id="param3" class="param-box bg-warning text-white">1</div> <div class="alert alert-info"> Bu sayfayı şu şekilde açmayı deneyin: <code>?name1=Ali&name2=Veli</code> </div> <div id="tikla" class="btn btn-danger btn-lg">GET</div> <small id="sonuc" class="h4 text-mute">aa</small> </div> </body>
body { padding: 30px; font-family: Arial, sans-serif; } .param-box { margin-bottom: 15px; font-size: 20px; padding: 15px; border-radius: 6px; }
$(document).ready(function () { function getParameterByName(name) { const url = window.location.href; const regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"); const results = regex.exec(url); return results ? decodeURIComponent(results[2].replace(/\+/g, " ")) : null; } const name1 = getParameterByName("name1") || "Parametre yok"; const name2 = getParameterByName("name2") || "Parametre yok"; $("#param1").text("name1: " + name1); $("#param2").text("name2: " + name2); const urlm = window.location.href; $("#param3").text(urlm); $("#tikla").on("click", function() { $("#sonuc").text("ok"); }); });
Related:
See More
Free Template
Paper Bootstrap Wizard
122.5K
76
Radio Button - Payment method selector
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76