1234567891011121314151617181920212223242526272829303132 |
- <form id="ff">
- <{foreach from=$forms item=form}>
- <{if $form.type == 'text'}>
- <input name="<{$form.name}>" type="text" class="input_style" placeholder="<{$form.name}>" >
- <{/if}>
- <{if $form.type == 'textarea'}>
- <textarea name="<{$form.name}>" class="input_textarea" placeholder="<{$form.name}>"></textarea>
- <{/if}>
- <{if $form.type == 'select'}>
- <select name="<{$form.name}>" class="dropdown-select">
- <option value="">请选择<{$form.name}></option>
- <{foreach from=$form.options item=option}>
- <option value="<{$option}>"><{$option}></option>
- <{/foreach}>
- </select>
- <{/if}>
- <{/foreach}>
- </form>
- <section class="button-wrapper">
- <a class="button" id="common_submit_btn">提交资料</a>
- </section>
- <script>
- $("select").on('change', function () {
- if ($(this).val() == '') {
- $(this).css({'color':'#999'});
- } else {
- $(this).css({'color':''});
- }
- });
- </script>
|