all thing you have to do is use javaScript function
JavaScript Example:
var random_number = function(){
return Math.floor(Math.random() * 10000) + 1;
};
document.getElementById('button_text').onclick = function () {
document.getElementById("input_box").innerHTML = random_number();
};
jQuery Example:
$.randomBetween(0,10000);
Related Posts:
- Sending the reset password link programatically
- Getting only direct child pages in WordPress with get_pages
- Any guides on creating custom admin pages?
- Multiple is_page() in page.php
- WordPress admin never finishes saving page on site with large page count
- Trigger a php file on every post or page if a condition is met
- add_rewrite_rule with bottom priority doesn’t handle the WordPress pages
- Listing all sub-pages?
- Best way to create a user programatically
- How to link to a custom .php page in my folder
- Help with a custom page template – listing contents of childpages?
- Javascript code inside “” in core WordPress files .php
- Passing the page ID to a login php script
- How can the plugin directory path be returned into ?
- Way to querry data (tags) from a wordpress database?
- Global variable $post returning incorrect object
- Button not refreshing page
- How to make a search button that will search my website?
- How to add a php custom page to WordPress
- Repeating admin-ajax.php not found error in admin
- My page.php shows the index.php
- How can I add an area/option for a custom page description?
- Create Page To Count Comments For Each Post In WordPress Site
- Why my image upload button is not working in wordpress widget area?
- get_the_title() gets printed out twice
- How do I find PHP file that contains content of my page?
- WordPress page content outside WordPress
- Inject class in body when particular page template is used
- Use .php file as page instead of wordpress page & template file?
- Use WordPress function in php file
- Custom PHP script throws critical error ONLY when editing page
- How to check if the current page is at a specified path in the URL?
- AJAX button action in foreach
- Hardening uploads folder in IIS breaks images
- Show About and Contact Us page when they’re clicked in the top menu.
- Parsing Menu Items and Blog Posts
- What’s the best way to include PHP code in pages?
- Automatically add images to a menu
- page-slug.php not working but only for specific slug
- Need php code’s output to display underneath a Divi Module
- How to echo every parent page title?
- How Do I Find & Remove H1 From Site-Title-Wrapper? [closed]
- Retrieve Json data and create multiple pages with it
- Display child page content of a specific parent on home page
- Removing custom sort order from admin page listing
- PHP Output also in Child theme, but different
- $wpdb->get_results breaking page?
- Unique PHP on each Page
- How to Display a List of Child Pages For a Parent Page in WordPress
- If is page, archive or search output this code
- WordPress Search
- List all anchor links on a page
- How do I add my PHP app to a WordPress page whilst keeping semantic URLs?
- Page load timer?
- Page not visible in ‘All pages’ after being added through PHP
- Cascading dropdown select search based on Parent Page & Child Page
- Edit and delete permissions pages and posts
- My worpress search page is showing no results
- A function to get the content of a page
- Add a product category to a specific product via a button
- Send an e-mail on address with the link with disliked post
- When I click for the redirect link it is showing the content of index.php instead of single_assignment_page.php
- Change button link to add nonce
- How to add a PHP scripts into WordPress
- Display page content in different sections – based on page break block?
- How to edit button permalink inside function.php using a child theme?
- How do I stop my form from adding code to current page URL instead of re-directing. Been stuck for days
- Child and Parent Pages list of sub pages
- Add Custom Taxonomy into Script
- loading a php file to a specific page id
- Getting page / post URL on publish and / or update
- how to call other plugins once custom post has been inserted
- Use page-templates without creating theme
- style.min.css code issue
- Get current_post in reverse order with pagination
- Create a custom theme-specific page, invisible in the admin-panel?
- Editing existing pre-created menus in PHP
- Replace content in WordPress Page after GET from php page
- Execute php in pages
- Manipulate database of WordPress site with my own scripts
- Why isn’t my link attribute getting my css?
- How to use PHP code with wordpress page
- Functions are causing errors
- Auto create description in post
- Show results for multiple page-types
- Display selected parts from selected pages on the frontpage?
- Adding Media button to only pages
- Trying to put a search page on site
- I want Page titles and excerpts to show up on home.php in certain order
- ACF: Echo page title when checkbox is checked
- Create a custom page URL
- How to refresh a template page on WordPress in 3 seconds – easiest method?
- I can’t seem to get excerpts showing inside get_pages and don’t know why?
- Forbid certain users to access a specific page
- How to return a Boolean for a page that is a subpage thru its name?
- How to handle parent and child pages?
- How do I remove blog entries from home page Twenty Eleven child theme?
- Create an if statement based on page_id
- kali php problem [closed]
- hello can you advise how to fix the error?