cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv


A Pen By Captain Anonymous

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

              <select id="delivery" size ="1" onchange="run()">
<option value="1" selected>24 Hour Speedy Delivery</option>
<option value="2">2 Day Delivery</option>
<option value="3">3 Day Delivery</option>
<h2>Your Estimated Delivery Date is</h2>
<div id="deliverydate"></div>
              var tomorrow = new Date();
var dd1 = tomorrow.getDate()+1;
var mm1 = tomorrow.getMonth()+1; //January is 0!
var yyyy1 = tomorrow.getFullYear();

var twodays = new Date();
var dd2 = twodays.getDate()+2;
var mm2 = twodays.getMonth()+1; //January is 0!
var yyyy2 = twodays.getFullYear();

var threedays = new Date();
var dd3 = threedays.getDate()+3;
var mm3 = threedays.getMonth()+1; //January is 0!
var yyyy3 = threedays.getFullYear();

if(dd1<10){dd1='0'+dd1} if(mm1<10){mm1='0'+mm1} 

tomorrow = mm1+'/'+dd1+'/'+yyyy1;

if(dd2<10){dd2='0'+dd2} if(mm2<10){mm2='0'+mm2} 

twodays = mm2+'/'+dd2+'/'+yyyy2;

if(dd3<10){dd3='0'+dd3} if(mm3<10){mm3='0'+mm3} 
threedays = mm3+'/'+dd3+'/'+yyyy3;

document.getElementById("deliverydate").innerHTML = tomorrow;

function run() {
     var e = document.getElementById("delivery");
var selected = e.options[e.selectedIndex].value;
if(selected == 1){
document.getElementById("deliverydate").innerHTML = tomorrow;
if(selected == 2){
document.getElementById("deliverydate").innerHTML = twodays;
if(selected == 3){
document.getElementById("deliverydate").innerHTML = threedays;
Loading ..................