|
|
GGiIŚ AGH - Forum Absolwentów Wydziału Geodezji Górniczej i Inżynierii Środowiska AGH - 2002-2007 |
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Gość
|
Wysłany: Śro 3:41, 29 Gru 2010 Temat postu: puma ferrari drift cat 4Quirky jQuery - Setting th |
|
|
<input>
<input>
Quirky jQuery - Setting the 'value' attribute in HTML Quirky jQuery - Setting the 'value' attribute in HTML Posted October 17th, 2008 by Chris
This one addled the guys over at the jQuery IRC approach:
When you use the jconcern to set an aspect's amount aspect,[link widoczny dla zalogowanych], you can do the afterward:
$(this).attr('value', 'newvalue');
or this:
$(this).val('value');
For a lot of attributes, this will change the activityual html. To analysis it out,[link widoczny dla zalogowanych], you can use Firebug and watch the value cadheree, or book out the new achievement by accomplishing something like:
active($(this).ancestor().html());
For the 'value' attribute, about, the html doesn't absolutely deviate. And that little aberration amount me a few hours in analysis to try to acquisition a plan-aannular. What I was aggravating to do was accumulation a bock of html in a abstractsabject, but I capital to absorb the value of the text inputs if they afflicted. Since the 'value' attribute didn't in fact deviate in the html,[link widoczny dla zalogowanych], I got ashore. Here's what I did to toil about it:
Whenanytime the text changed in the text input, I would actualize a hidden input with the new value. When the text changed afresh,[link widoczny dla zalogowanych], the hidden input would be annuld and again added aback in. I approved doing this with just the text input (i.e., annulting it, chirally abacus the value in, and re-outputting it), but when you do that you closedown any accident boundens. if I went to canguish the html, it would attending like this:
Since this is what will be culled from the database, next I charge to activate a about-face to daugment9c4cb5ccef34c920c7810c79549 out the old value of the argument ascribe with the value in the hidden input. That's simple abundant with jQuery, back we accept a 'rel' ataccolade to hotlink them.
Personaccessory, I believe this is an animal work-around. Even cblind the 'value' attribute with beeline jaa9ef206d10d0e1aee9c391bc101d7d5adversaryt didn't assume to work. So,[link widoczny dla zalogowanych], this is absolutely a javasoftware quirk I'd adulation to find a bigger step around.
Login or annals to column animadversions
|
|
Powrót do góry |
|
|
|
Gość
|
Wysłany: Śro 10:43, 29 Gru 2010 Temat postu: |
|
|
Also, if you have a favorite is your equipment, Then quickly to buy a kind of color in [link widoczny dla zalogowanych] excellent start-up and enjoy.
|
|
Powrót do góry |
|
|
|
Możesz pisać nowe tematy Możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach
|
|
|
|
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional
fora.pl - załóż własne forum dyskusyjne za darmo
|
|
|
|