|
Addition en javascript
Salut tout le monde, Voilà, je suis en train de découvrir le langage Javascript que j'incorpore dans mon code HTML sur <A ONCLICK=""> mais quand j'essaie de faire une addition entre deux valeurs form.name.value1 et form.name.value2 ça me retourne la concaténation de ces deux valeurs et non l'addition. D'où la question : Comment fait-on pour additionner en javascript ? Merci d'avance. *1f562f (2009-03-26 11:53:11) Addition en javascript Essaie avec la fonction parseInt(), du style a = parseInt(form.name.value1) + parseInt(form.name.value2) Ca devrait mieux marcher ![]() ficgs Suggestions ficgs Plus de sources Vous devez vous enregistrer pour consulter ces sources, vous pourrez alors changer leur ordre en cliquant sur les icones les précédant. admin Autres sources Ce projet est collaboratif, vous pouvez remonter les sources suivantes dans la liste si vous les trouvez utiles. ![]() ![]() functionx > javascript/Lesson04.htm ![]() ![]() experts exchange > Programming/Misc/Q 21028069 ![]() ![]() p2p.wrox > vbscript/45216 ![]() ![]() computing > answers/programming/javascript PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING... I'd go with the first option as that would corerct the issue at the... ![]() ![]() dreamincode > forums/showtopic17415.htm ![]() ![]() daniweb > forums/thread91856 Just looking for directions to follow and work on and not the... No one has posted to this discussion for at least three... ![]() ![]() webdeveloper > forum/archive/index.php/t 50553 That's probably because you didn't the define the variable: isA... ![]() ![]() commentcamarche > contents/javascript/jsop.php3 Si vous avez un de ces messages lorsque vous essayer d'introduire une... Qu'est-ce qu'une structure conditionnelle' On appelle structure... ![]() ![]() answers.yahoo > question/index?qid=20080630034433AAX8hxE How can I make sure java script is working on my... I just won 1st place in Website Development for FBLA State... ![]() ![]() houseoffusion > groups/cf talk/thread.cfm/threadid:14269 You might try adding a ParseInt() function around the value as... JavaScript is case sensitive, so that should be parseInt() rather... ![]() ![]() developpez > forums/d431811/webmasters developpement web/javascript/l et au lieu de m'afficher le total, ça m'affiche d'abord... Salut, Pourquoi faire un parseInt(total), alors que total est... ![]() ![]() quirksmode > js/intro DOM Scripting: Web Design with JavaScript and the Document Object... in Netscape 4 can have some unexpected side effects that are too... ![]() ![]() drupal > node/76637 ![]() ![]() overclock > web coding/148485 basic javascript Never mind! I figured it out! I put this function between the... ame_toggle_view({other : 'true',post : 'true',blog : 'true',group :... ![]() ![]() sourcecodeonline > list Tigra Menu is free JavaScript menu navigation component for web sites... JavaScript Slideshow by BarelyFitz is a cool, compact and an amazing... ![]() ![]() zytrax > about site.htm This button indicates that the POP-UP/POP-OUT/DROP-DOWN menus use CSS... This button indicates that the page has been modified to use modern... ![]() ![]() codeave > JavaScript/code.asp?u log=7054 ![]() ![]() opera > browser/tutorials/userjs/using ![]() ![]() smashingmagazine > 2009/02/08/50 extremely useful javascript tools ![]() ![]() theappleblog > 2009/03/27/javascript 3 10x faster on iphone os 30 ![]() ![]() kb.mozillazine > Allowing only certain sites to use JavaScript can have multiple websites separated by spaces, like... ![]() ![]() modelworks > editors/javascript ![]() ![]() forums.aspfree > asp development 5/javascript date controlling date and time formats in an asp-generated... accessing controls embedded in a user control via... ![]() ![]() amazon > JavaScript Don Gosselin/dp/1423901509 ' + adPropertiesDelimiter + 'description' +... ' + adPropertiesDelimiter + 'visibleUrl' +... ![]() ![]() nanaze > 2009/01/debugging javascript on android ![]() ![]() spamhuntress > javascript redirect ![]() ![]() gallery.menalto > node/727 ![]() ![]() tutorials > forum/javascript ajax/233308 ![]() ![]() degutis > dev/2009/03/14/on jquery and javascript ![]() ![]() en.wikipedia > wiki/Greasemonkey ![]() ![]() snipplr > view/6431/jquery dynamic form field ![]() ![]() cs.grinnell > ~walker/courses/105.sp04/labs/javascript intro 1.shtml into your browser, and record what happens in each of the... follows the same general format as the html pages we have seen... ![]() ![]() designerwiz > JavaScripts/JavaScript ![]() ![]() codeguru > forum/showthread.php?t=417361 ![]() ![]() sitepoint > forums/showthread.php?t=5181 There's no trackback at the moment.
[Games online]
[Last topics]
[Glossary]
[Help]
[Membership]
[About]
[Social network] [Hot news] [Discussions] [Seo forums] [Meet people] [Directory] |