I got not much clue about javascript, so i need help.
I get some result in PHP, something like this:
I've found some code on google, but got no clu how to use it.
where and how to place this javascript ?
I get some result in PHP, something like this:
PHP Code:
echo "Here is your result:<br/><input type='text' size='50' value='$final_result'>";
///// Need copy to clipboard BUTTON here for value $final_result
Code:
<script language="JavaScript">
<!-- Begin
function copyit(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
therange=tempval.createTextRange()
therange.execCommand("Copy")
}
// End -->
</script>
Code:
<form name="aspinc">
<pre>
<div align="center">
<input onclick="copyit('aspinc.select1')" type="button" value="Highlight All" name="cpy">
<p>
<textarea class="codebox-sm" name="select1">
Text you want to highlight goes here.
</textarea>
</p>
</pre>
</div>
</form>



Comment