Focus on the UI -- alert () beat you !, Focus on uialert defeat

Source: Internet
Author: User

Focus on the UI -- alert () beat you !, Focus on uialert defeat

In my previous company, I often wrote aler () prompts on the page. I didn't think there was anything. Normally, I thought the prompts should have been like this. But when I arrived at this company, during the test, the tester saw an aler pop-up box. As a result, my page was returned and rewritten. Then I realized what a silly error it was!

 

Original:

Let's take a look at the alert Interface:

 

 

Let's look at it again:

Do you see the problem? Are you familiar with it? It feels normal! Then let's take a look at this image:

 

 

 

Does it seem abnormal immediately? Our prompt name says "success! The result is a big dangerous symbol, which is a very low-level error for good software!

 

Solution:

Actually, jquery is aware of this problem. He has a complete set of solutions. Let's take a look at the results first:

 

 

This is indeed much better than our native alert!

Source code: jQueryAlert

 

Summary:

There are N reasons for a piece of software to make users like it, but there is only one reason for a piece of software to make users hate it: "It's not easy to use". I will think about it as below:

 

1. Hard to see

2. Not fast enough

3, not simple

 

It is an artistic problem, color matching, button size, resolution selection, and so on.

Fast, most of which are technical issues, and a small part of which are artistic issues. Over-doing animation is just a preliminary design. Fast, fast, or slow, in the touch screen control era, we can't beat our fingers.

Simple, this is another artistic and humanistic topic. Such a design requires the designer to know what the user wants most and what he wants most, and then give it to him! Just like the current Apple mobile phone, the mobile phone is just a box containing software. Apple sells the ios software!

Today, when our hardware is catching up with developed countries, we should also think about and upgrade our soft power. Don't let alert beat you again. Are you better prepared?

 


In. NET, how can I make ResponseWrite ("<script> alert ('added successfully'); </script>") Wait for the user to confirm before turning to the following statement?

Add document. URL = "FirstPage. aspx"; after alert in the script, and delete Response. Redirect ("FirstPage. aspx ");

When the alert function in javascript is executed, the focus of the program will be transferred to this function. I want to create a div pop-up layer to replace alert.

You can use the jQuery UI plug-in.
First introduce jQuery and plug-in js,
<Link rel = "stylesheet" type = "text/css" href = "jquery/ui/css/jquery-ui.css">
<Script type = "text/javascript" src = "jquery/jquery-1.4.2.js"> </script>
<Script src = "jquery/ui/js/jquery-ui.min.js"> </script>
The file path is random.

Then call the display code:
$ ('# Show_app_popup'). dialog ({
Modal: true, // modal Dialog Box
Draggable: false, // whether to drag
Width: "auto", // automatic width
Height: "auto", // Automatic height
Position: "center" // center
});

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.