Horje
am pm after the time in html Code Example
am pm after the time in html
var inputEle = document.getElementById('timeInput');


function onTimeChange() {
  var timeSplit = inputEle.value.split(':'),
    hours,
    minutes,
    meridian;
  hours = timeSplit[0];
  minutes = timeSplit[1];
  if (hours > 12) {
    meridian = 'PM';
    hours -= 12;
  } else if (hours < 12) {
    meridian = 'AM';
    if (hours == 0) {
      hours = 12;
    }
  } else {
    meridian = 'PM';
  }
  alert(hours + ':' + minutes + ' ' + meridian);
}




Html

Related
how to put two words in a button on single line Code Example how to put two words in a button on single line Code Example
html paragraph with spaces Code Example html paragraph with spaces Code Example
December global festivities Code Example December global festivities Code Example
html video frame image Code Example html video frame image Code Example
a pint of sap from a 4000 year old bristlecone pine Code Example a pint of sap from a 4000 year old bristlecone pine Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10