If you want to interact with users in Web programming, I know that alert () is a good method sometimes and it feels unfriendly. However, the tip of extjs is very effective. You can extend it again.
An example was provided last night, that is, Asp.net calls the front-end js code from the background.
The Code is as follows:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
JS Code:
Function confirmrelogin () {alert ("dddd") ;}; function Hello () {Ext. onready (function () {// alert ("1111"); Ext. messageBox. alert ("prompt", "Logon canceled successfully ");});};
Background code:
using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>hello();</script>"); }}
The effect is as follows: