Homepage United Colleges | Codes and Scripts

Latest Posts

Age Calculator

Enter Day: Enter Month: Enter Year: Calculate Age Total Years: ...

Copy Button for Text Under Pre Tag

<pre id="textToCopy">Hello</pre> <button onclick="copyText()">Copy Text</button> <script>...

Javascript Hide Element

<script>   // Get the button by its id   var hideButton = document.getElementById('hideButton');   // Add a click event listen...

Get or Display Custom Field on WordPress

<?php echo get_post_meta(get_the_ID(), ' fieldname ', TRUE); ?> Replace fieldname with your custom field name. This is a PHP c...

Display or Get Input Value in JavaScript

In JavaScript, you can use the value property of an input element to get or set the value of the element. For example, given an input elemen...