Home > Web Front-end > JS Tutorial > body text

js prompt box with button for selection sample code_javascript skills

WBOY
Release: 2016-05-16 17:22:19
Original
998 people have browsed it

I encountered a problem in the project today (I don’t have deep front-end skills, so don’t complain if you are an expert):

Pop-up box that can be selected:

I didn’t expect a good prompt effect using jQuery.

Refer to the js API document to implement the following ===confirm:

Copy the code The code is as follows:

var r=confirm("The order number already exists, please re-enter or check the existing order details!")
if (di != null&& (r==true)) {
userNameCnl.focus();//Position
userNameCnl.value = "";//Clear data
}else if(r==false){
userNameCnl.focus();
}

Keep it for yourself for future use! ! !
Related labels:
js
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!