Thanks for your reply.

all the select elements are in a form.

But those selects can be referenced correcly after i insert some
unused element such as <input type="button" name="willberemove"/><br>

<font>Company:</font>
<font id="singlecompany" style="display: none;"></font>
<select name="companyID" id="companySelectID" WIDTH="130px" /><br>
<input type="button" name="willberemove"/><br>
<font>Division:</font>
<font id="singledivision" style="display: none;"></font>
<select name="divisionID" id="divisionSelectID"/><br>
<input type="button" name="willberemove"/><br>

it is ok now,but why not after i removed buttons?

On 4月19日, 下午4时16分, James <james.gp....@gmail.com> wrote:
> Your HTML for <select> is not valid.
> It's suppose to be in the form of:
>
> <select id="...">
>    <option value="...">option</option>
> </select>
>
> Is there a reason you're doing it like that?
>
> On Apr 18, 8:27 pm, neil <gaojun...@gmail.com> wrote:
>
>
>
> > <select name="licenseeID" id="licenseeSelectID" /><br>
> > <table><tr><td>Select</td><td>FileName</td><td>Date</td></tr> </table>
> > <div id="tablediv"></div><br><br><br><br><br><br><br>
> > <font>Company:</font>
> > <font id="singlecompany" style="display: none;"></font>
> > <select name="companyID" id="companySelectID" WIDTH="130px" /><br>
> > <font>Division:</font>
> > <font id="singledivision" style="display: none;"></font>
> > <select name="divisionID" id="divisionSelectID"/><br>
> > i can reference the fist select 'licenseeID' and populate it.
>
> > but the third 'divisionID' can not be referenced,which says 0.options.
>
> >  var licenseeid=$('#licenseeSelectID').val();
> >  $('#divisionSelectID')[0].options.length=0;- 隐藏被引用文字 -
>
> - 显示引用的文字 -

Reply via email to