Unescape
<input size="111" onkeyup="unesc(this.form)" name="uri1" id="uri1" value=" " type="text" /> eingabe<br>
<input size="111" onkeyup="unesc(this.form)" name="uri2" id="uri2" value=" " type="text" /> unescape<br>
<input size="111" onkeyup="unesc(this.form)" name="uri3" id="uri3" value=" " type="text" /> decodeURI<br>
<input size="111" onkeyup="unesc(this.form)" name="uri4" id="uri4" value=" " type="text" /> decodeURIComponent<br>
<script>
function unesc(param)
{
document.getElementById("uri2").value=unescape(document.getElementById("uri1").value);
document.getElementById("uri3").value=decodeURI(document.getElementById("uri1").value);
document.getElementById("uri4").value=decodeURIComponent(document.getElementById("uri1").value);
};
//alert(document.getElementById("uri").value)
</script>
CSS Properties
http://kangax.github.io/cft/style.html
Ein mit anderen Scripten kompatibler Autostart
http://wiki.selfhtml.org/wiki/JavaScript/Fader-Framework/Framework
Das folgende Beispiel zeigt, wie eine vorherige Funktion in window.onload nicht verloren geht:
function fertig() {
alert("Das Laden hat ein Ende!");
}
var oldWindowOnload = window.onload;
window.onload = function () {
if (typeof(oldWindowOnload) == "function") {oldWindowOnload();}
fertig();
};
Redirect / Forwarding
http://www.websmith.de/blog/webprogrammierung/redirect-suchmaschinen/redirect-mit-javascript-21/
<script>
window.setTimeout('window.location = "http://www.ihre-seite.de"',2000);
</script>
<script>
window.location.replace('http://www.neueadresse.de');
</script>
http://hihn.org/2008/11/assoziatives-array-in-java/
Ein assoziatives Array in Java erstellen:
import java.util.HashMap; import java.util.Map; (...) Map config = new HashMap(); config.put("vorname", "Max"); config.put("nachname", "Mustermann"); String vorname = config.get("vorname"); String nachname = config.get("nachname"); System.out.println(vorname+" "+nachname);
http://www.java-forum.org/java-basics-anfaenger-themen/66849-strings-kopieren.html
Strings werden intern ein bißchen anders behandelt, als normale Objekte. Sie liegen in einem "pool". Das sorgt dafür, dass bei
String a = "Hallo";
String b = "Hallo";
System.out.println(a==b);
"true" ausgegeben wird, obwohl man Strings praktisch immer mit .equals vergleichen sollte!
Bei sowas wie
String a = "Hallo";
String c = new String("Hallo");
System.out.println(a==c);
wird eine echte Kopie des Strings erstellt, und es wird false ausgegeben.
6
7
8
9