Gebruiker: Bmulckhu/kladblok2: verschil tussen versies

Uit MediaWikiGids
Ga naar: navigatie, zoeken
(Nieuwe pagina aangemaakt met 'bron: https://stackoverflow.com/questions/3915917/make-a-link-use-post-instead-of-get <pre><nowiki> .inline { display: inline; } .link-button { background: n...')
 
 
(12 tussenliggende versies door dezelfde gebruiker niet weergegeven)
Regel 33: Regel 33:
 
</nowiki></pre>
 
</nowiki></pre>
  
 +
{{fullurl:{{FULLPAGENAME}}}}
 
<html>
 
<html>
<form method="post" action="some_page" class="inline">
+
<form method="post" action="http://gids.wikiwerkers.nl/w/index.php?title=</html>{{FULLPAGENAME}}<html>" style="display: inline;">
 
<input type="hidden" name="extra_submit_param" value="extra_submit_value">
 
<input type="hidden" name="extra_submit_param" value="extra_submit_value">
<button type="submit" name="submit_param" value="submit_value" class="btn">
+
<button type="submit" name="action" value="raw" class="btn">
 
This is a link that sends a POST request
 
This is a link that sends a POST request
 
</button>
 
</button>
 
</form>
 
</form>
 
</html>
 
</html>
 +
 +
<html>
 +
<form method="post" action="http://gids.wikiwerkers.nl/w/index.php?title=</html>{{FULLPAGENAME}}<html>" style="display: inline;">
 +
<input type="hidden" name="action" value="purge">
 +
<button type="submit" class="btn btn-warning">
 +
Purge
 +
</button>
 +
</form>
 +
</html>
 +
 +
{{#widget:purge-button|url={{fullurl:{{FULLPAGENAME}}}}}}

Huidige versie van 26 jan 2021 om 12:22

bron: https://stackoverflow.com/questions/3915917/make-a-link-use-post-instead-of-get

.inline {
  display: inline;
}

.link-button {
  background: none;
  border: none;
  color: blue;
  text-decoration: underline;
  cursor: pointer;
  font-size: 1em;
  font-family: serif;
}
.link-button:focus {
  outline: none;
}
.link-button:active {
  color:red;
}
<a href="some_page">This is a regular link</a>

<form method="post" action="some_page" class="inline">
  <input type="hidden" name="extra_submit_param" value="extra_submit_value">
  <button type="submit" name="submit_param" value="submit_value" class="link-button">
    This is a link that sends a POST request
  </button>
</form>

http://gids.wikiwerkers.nl/w/index.php?title=Gebruiker:Bmulckhu/kladblok2