Evo markiranje kako ga izvodi phpmyadmin:
Code:
u textarea tag dodaš:
onfocus="selectContent( this, sql_box_locked, true )"
a ovo u HEAD:
/**
* @var sql_box_locked lock for the sqlbox textarea in the querybox/querywindow
*/
var sql_box_locked = false;
/**
* @var array holds elements which content should only selected once
*/
var only_once_elements = new Array();
/**
* selects the content of a given object, f.e. a textarea
*
* @param object element element of which the content will be selected
* @param var lock variable which holds the lock for this element
* or true, if no lock exists
* @param boolean only_once if true this is only done once
* f.e. only on first focus
*/
function selectContent( element, lock, only_once ) {
if ( only_once && only_once_elements[element.name] ) {
return;
}
only_once_elements[element.name] = true;
if ( lock ) {
return;
}
element.select();
}
Mada mi uopšte nije jasno zašto uopšte stavljaš tekst u textareu ako ne treba da se edituje, a pogotovo svrha markiranja.
"The quieter you become, the more you are able to hear."
Blog |
PowerCMS