search
Homephp教程PHP开发jquery gets the value implementation method of easyui date control

In the jquery easyui date control, how to use JS to get the set date value on the page

jquery gets the value of the easyui date control

jquery easyui date box

There is such a date text box:

Use easyui to select the date value for the text box, and then, to Get the latest value in this date box in JS.

I originally thought this was a simple question, just

var dv = $('#mdate').val();

wouldn’t it be OK? But contrary to expectations, what I got was empty. If I assigned an initial value to this text box in the background, no matter what value you select, you will still get the initial value.

The solution is to use easyui's own function to get it:

var dv = $('#mdate').datebox('getValue');

The reason is that easyui has added a hidden In the input form, it assigns the value to that, but it is still very strange that when the form is submitted, the form named mdate still submits the correct value. I suspect that some manipulation was done before submission, and the value is dynamically given The original form is assigned a value. Didn't study it carefully.


Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software