0

我有一个注册表单,其中有一个字段,该字段仅在选择下拉框中的某些行后才显示。这一切都很好,但是我无法让盒子适应当前的设计,一旦选择了盒子,它就会显得格格不入。要查看出现的框,请从 sia 许可证类型字段中选择字段安全防护。可以在此处找到该页面的链接:http ://www.security-vacancies.net/regsitration/index.php

任何建议我如何使它适合当前的设计将不胜感激。

<p>
<label for="postcode">SIA License Type</label>
<select id='sia_question' onchange='displayoptional()' select="select" name="sia_question">
    <option value='' selected="selected">Please S elect</option>
    <option value='1'>Do Not Have A License</option>
    <option value='2'>Have Appied for a License </option>
    <option value='3'>Security Guarding</option>
    <option value='4'>Door Supervision</option>
    <option value='5'>Close Protection</option>
    <option value='6'>Key Holding</option>
    <option value='7'>Public Space Surveillance</option>
    <option value='8'>Vehicle Immobilisation</option>
    <option value='9'>Cash In Transit</option>
    <option value="10">Non Frontline</option>
</select>
<div style='display:none' id='optional'>
    <span class="style204"> Please Enter an SIA License Number: <input id='sia_license' type='text' name="sia_license" value=""/></span>
</div>
</p>
4

1 回答 1

1

好吧,只需像代码中的所有其他字段一样设置它的样式:

<p>
    <label for="postcode">SIA License Type</label>
    <select id='sia_question' onchange='displayoptional()' select="select" name="sia_question">
        <option value='' selected="selected">Please S elect</option>
        <option value='1'>Do Not Have A License</option>
        <option value='2'>Have Appied for a License </option>
        <option value='3'>Security Guarding</option>
        <option value='4'>Door Supervision</option>
        <option value='5'>Close Protection</option>
        <option value='6'>Key Holding</option>
        <option value='7'>Public Space Surveillance</option>
        <option value='8'>Vehicle Immobilisation</option>
        <option value='9'>Cash In Transit</option>
        <option value="10">Non Frontline</option>
    </select>
</p>
<p style='display:none' id='optional'>
    <label for="postcode">SIA License Number</label>
    <input id='sia_license' type='text' name="sia_license" value=""/>
</p>

就是这样,我猜。

于 2012-06-19T14:23:45.837 回答