Home  >  Article  >  Web Front-end  >  js prompt box with button for selection sample code_javascript skills

js prompt box with button for selection sample code_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:22:19999browse

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! ! !
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