Modify item order in select field with javascript -
i have this:
<select name="repeat_period"> <option value="24">daily</option> <option value="168">weekly</option> </select>
and goal remove/hide daily item force chose weekly. solution invert item order , set "readonly". in both case don't know how do.
precision: don't have access html of page. can use javascript try make modification , don't know javascript.
any clue ?
fortunately found solution in forum people more disposed newbie me. if guru coder, not need ask help.
<script type="text/javascript"> function removeit(){ var sel=document.getelementsbyname('repeat_period')[0]; sel.options.remove(0); } removeit(); </script>
Comments
Post a Comment