(X)HTML, JavaScript, DHTML, XML, CSS Client scripting tehnologije, Dynamic HTML, Cascading Stylesheets, XML i standardi |
|
Alati teme | Način prikaza |
![]() |
#8 |
VD IT Direktora
Invented the damn thing
Datum učlanjenja: 08.06.2005
Lokacija: Beograd
Poruke: 2.118
Hvala: 503
1.307 "Hvala" u 282 poruka
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() HTML kôd:
<html> <head> <style type="text/css"> #realedit { font-family: courier new; font-size: 10pt; /*background-color: #efe;*/ border: solid 1px black; width: 200px; height: 20px; } #divedit { font-family: courier new; font-size: 10pt; /*background-color: #fee;*/ border: solid 1px black; width: 200px; height: 20px; overflow: hidden; } </style> <script src="jquery.js" type="text/javascript"></script> <script type="text/javascript"> var colors = ['blue', 'green', 'red']; var colorindex = 0; function recolor(element, text) { element.empty(); text.replace(/(\S+)/gi, function(m) { element.append($('<span style="color:' + colors[colorindex] + '">' + m + ' </span>')); colorindex++; colorindex %= colors.length; return m; }); } function hideedit() { $('input#realedit').hide(); $('div#divedit').show(); recolor($('div#divedit'), $('input#realedit').val()); } function showedit() { $('input#realedit').show(); $('div#divedit').hide(); } $(function() { $('input#realedit').blur(hideedit); $('div#divedit').click(showedit); hideedit(); }); </script> </head> <body> <div id="divedit"></div> <input type="text" id="realedit" value="trla baba lan" /> </body> </html> Off Topic: Hehe, vidi se da sam već dao otkaz... ![]() Poslednja izmena od jablan : 23. 10. 2007. u 10:42. |
![]() |
![]() |
"Hvala" jablan za poruku: |
|
|
![]() |
||||
Tema | Početna poruka teme | Forum | Odgovori | Poslednja poruka |
Input Validation | eclipse | Sva početnička pitanja | 4 | 08. 04. 2011. 04:13 |
<input> array | misk0 | Sva početnička pitanja | 3 | 25. 06. 2008. 19:21 |
input type=file i njegov value | japan | PHP | 6 | 30. 05. 2008. 18:43 |
Input escape - mysql_real_escape_string | bluesman | PHP | 11 | 11. 03. 2007. 15:14 |
dodavanje/brisanje input fields javascriptom | dee | (X)HTML, JavaScript, DHTML, XML, CSS | 31 | 12. 11. 2006. 01:01 |