javascript - Append variable value to form Input -



javascript - Append variable value to form Input -

this question has reply here:

how utilize javascript variables in jquery selectors 5 answers

i need append numeric value stored in 1 variable form input fields.

let's say

var b= 5; var text=$("#dropdown_id").val();

i want append value of variable b in dropdown_id .

my expected result #dropdown_id5

use string concatenation:

$("#dropdown_id" + b).val()

javascript jquery html

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -