Új hozzászólás Aktív témák
-
Speeedfire
nagyúr
Egy ilyet hogy lehet elegánsan megoldani, hogy ne inline js legyen?
<input class="tbox" type="text" name="search" value="Keresés az oldalon ..." title="Írd be a keresendő szót és nyomj ENTER-t !"
onfocus="if ( this.value == 'Keresés az oldalon ...' ) {
this.value = '';
this.style.color = '#B8B8B8';
this.style.borderColor = '#f90';
}"
onblur="if ( this.value == '') {
this.value = 'Keresés az oldalon ...';
this.style.color = '#B8B8B8';
this.style.borderColor = '#acacac';
}" />Ezzel próbálkoztam, de nem megy.
Ez egy másik projekthez lenne.$(document).ready(function()
{
$(".hirnev").onfocus(function ()
{
var t= $(this);
t.attr('value',t.attr('value').replace('név...',''));
});
$(".hirnev").onblur(function ()
{
var t= $(this);
t.val('value',t.attr('value').replace('','név...'));
});
});Fotóim https://fb.com/toth.szabolcs.art || IG: http://instagram.com/_tothszabolcs_ || Weblapom http://szabolcs-toth.com
Új hozzászólás Aktív témák
Állásajánlatok
Cég: Alpha Laptopszerviz Kft.
Város: Pécs
Cég: Ozeki Kft.
Város: Debrecen