Team:Warsaw/JSTest
From 2008.igem.org
(Difference between revisions)
Line 1: | Line 1: | ||
{{WarHead}} | {{WarHead}} | ||
<html> | <html> | ||
- | + | ||
- | <div id="html | + | <div id="html"></div> |
<div id="progress"></div> | <div id="progress"></div> | ||
<div id="result"></div> | <div id="result"></div> | ||
- | + | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
Line 33: | Line 33: | ||
} | } | ||
- | + | function getQuerystring(key, default_) | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
{ | { | ||
- | + | if (default_==null) default_=""; | |
- | + | key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); | |
- | + | var regex = new RegExp("[\\?&]"+key+"=([^&#]*)"); | |
- | + | var qs = regex.exec(window.location.href); | |
- | + | if(qs == null) | |
- | + | return default_; | |
- | + | else | |
- | + | return qs[1]; | |
- | + | ||
- | var | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
} | } | ||
+ | document.getElementById("html").innerHTML=getQuerystring("action","browse"); | ||
- | + | /* ]]> */</script> | |
- | |||
- | |||
- | |||
</html> | </html> | ||
{{WarNotebookEnd}} | {{WarNotebookEnd}} |
Revision as of 19:43, 25 October 2008
|