jQuery variable claiming it's undefined when it has been defined

后端 未结 4 2054
盖世英雄少女心
盖世英雄少女心 2021-01-27 17:40

I\'m trying to have two autofilling textboxes, one for a phone model - input1 and one for firmware - input2 on the same page. When both filled I want a div to be shown with the

4条回答
  •  情深已故
    2021-01-27 18:02

    It's probably a scoping problem. Try adding this to the top of your script:

    var phone;
    var phoneid;
    

    The subsequently omit the var

    phone = li.selectPhone;
    

提交回复
热议问题