multiply text value and display answer jquery -
I am trying to multiply a value that is already generated using jazzery, but a constant value . I have done this when the value is coming from the text box, not just by the span tag.
The script below works when taking the value from the textbox
Even what I still have:
HTML is that file I want to multiply the
constant value by & lt; P id = "sum" name = "equip_amount_four" & gt; & Lt; / P & gt; This is what I want to answer the static values of html above
jQuery
& lt; Script & gt; Var multiplexers = function () {var val1 = parseFloat ($ ('# share'). Val ()) var val2 = .086667 val3 = val1 * val2 || "Invalid number" $ ("# result"). Html (val3.toFixed (2))} $ ("# share"). Key (function () {multilingual share ();}); & Lt; / Script & gt; It looks like there are some mismatched IDs in your HTML:
var multiplexers = function () {var val1 = parseFloat ($ ('# sum'). Text ()); Var Val 2 = .086667; Var val3 = val1 * val2; Val3 = isNaN (val3)? "Invalid number": val3.toFixed (2); $ ("# EquipPymnt") HTML (val3). } Multiplaces (); & lt; Script src = "https://ajax.googleapis.com/ ajax / libs / jQuery / 1.11.1 / jquery.min.js" & gt; & Lt; / Script & gt; & Lt; P id = "sum" name = "equip_amount_four" & gt; 500 & lt; / P & gt;
Comments
Post a Comment