Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript dropdown options auto-updating

<select name="year">
<option value="">-- Select Year --</option>
<script type="text/javascript"><!--
var HowManyListItems = 5; // Specify number of "year" selections.
var year = new Date().getFullYear();
for(var i = 0; i < HowManyListItems; i++)
{
   var t = i + year;
   document.write('<option value="' + t + '">' + t + '</option>');
}
//--></script>
</select>
Comment

PREVIOUS NEXT
Code Example
Javascript :: get src vanilla js 
Javascript :: stiches js keyframes 
Javascript :: elementor slider javascript edit 
Javascript :: change color jquery css 
Javascript :: react hooks remove item from array 
Javascript :: js plugin for drop down with images 
Javascript :: btn click on click file javascript 
Javascript :: how to get nth tr in js 
Javascript :: const isEnabled = !Object.keys(errors).some(x = errors[x]); 
Javascript :: json mapper 
Javascript :: JS check the type stored in the name variable in JS 
Javascript :: create 24 hours array like 00:00 to 23:30 
Javascript :: react native image path in vriable 
Javascript :: how to read from asset in angular 
Javascript :: filter list of array if not true return default array 
Javascript :: node middle code for server 
Javascript :: getelementbyid without the <script 
Javascript :: javascript to prevent method POST from realoading 
Javascript :: ES5 Assigning Variables to Object Properties 
Javascript :: I want to enable textbox when checkbox is checked in jquery or javascript 
Javascript :: formatDuration js 
Javascript :: how to add autoserial number in react js 
Javascript :: conditional json spread operator 
Javascript :: copy Konva Transform object 
Javascript :: how to trigger on Blur only when clicked outside parent component and not child component in react js 
Javascript :: dummy servers using nodejs 
Javascript :: emacs some part of the text read only 
Javascript :: ameca face expression code xcode 
Javascript :: get computer name in javascript in adobe livecycle designer 
Javascript :: add html symbols with javascript 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =