Guten Abend!
Ich habe ein problem mit einem copy to clipboard (in die zwischenablage kopier-)
button den ich letztens mit ZeroClipboard gemacht habe, das ganze sieht so aus:
<html>
<head>
<title>Minopolis IP</title>
<script type="text/javascript" src="ZeroClipboard.js"></script>
<script language="JavaScript">
var clip = null;
function $(id) { return document.getElementById(id); }
function init() {
clip = new ZeroClipboard.Client();
clip.setHandCursor( false );
clip.addEventListener('mouseOver', function (client) {
// update the text on mouse over
clip.setText( $('fe_text').value );
});
clip.addEventListener('complete', function (client, text) {
alert("Text copied to clipboard.");
});
clip.glue( 'd_clip_button');
}
</script>
</head>
<body onLoad="init()">
<!-- <input type="text" size="40" id="Code" value="minopolis.minecraft.to"/> -->
<!--<textarea id="fe_text" cols=20 rows=1
onChange="clip.setText(this.value)">minopolis.hopto.org</textarea> -->
<!-- <input type="text" size="40" id="Code" value="minopolis.hopto.org"
onChange="clip.setText(this.value)"/></input> -->
<textarea id="fe_text" cols=20 rows=1
onChange="clip.setText(this.value)">minopolis.hopto.org</textarea>
<input type="button" id="d_clip_button" value="Copy to Clipboard" /></input>
</body>
</html>
... das funktioniert auch mit den richtigen dateien nur hätte ich gerne statt einem
Textfeld einen input tag.
Könnt ihr mir da weiterhelfen?
Danke im voraus.