我试图从下降中挑选一个数字数值,这里是代码线。
rowid = LogGridId(gridId, row);
$(`#${rowid}`).find(`select option[value^= IDnum ]`).prop("selected", true);
But I want showing the first value (1) before first semicolon in option value when ID=1 is selected from example
<option value="1;A;0.0000;False;True">ID10 (9.00%)</option> <option value="15;T;0.0000;True;True">Jon (10.00%)</option> <option value="12;Y;0.0000;True;True">Bam (0.00%)</option>
现在我的问题是,在我选择ID=1时,它总是以1为起点显示最低地位,因此,在我选择ID=1时,ID=12将显示这一点,但预期结果显示ID=1。
Do anyone know how to solve it? by just modify this line of code, not include option value above.
$(#${rowid}
).find(select option[value^= IDnum ]
).prop("selected", true);
我如何从选择价值中适当提取数字价值,然后将价值分成头半殖民地