Dieser Artikel beschreibt die Implementierung des Dialogfelds JS Div -Simulation, um URL -Inhalte anzuzeigen. Teilen Sie es für Ihre Referenz wie folgt weiter:
<Script> Funktion salert (str) {var msgw, msgh, borderColor; msgw = 800; // Die Breite des Eingabeaufforderungfensters msgh = 600; // Die Höhe des Eingabeaufforderungfensters titheight = 25 // Das Titelheight des Eingabeaufforderungfensters Border Color = "#336699"; // Die Grenzfarbe der Eingabeaufforderung des Fensters Titlecolor = "#99CCFF"; // Die Titeltitelfarbe des promptalen Fensters Var Swidth, SHEIGHTH, SHEIGHTH, SHEIGHTH, SHEIGHTH, SHEIGHTH, SHEIGHTH, SHEIGHTH, SHEIGHTH, SHEIGHT; swidth = document.body.offsetwidth; SHEIGHT = screen.height; var bgobj = document.createelement ("div"); Bgobj.Setattribute ('id', 'bgdiv'); bgobj.style.position = "absolut"; bgobj.style.top = "0"; bgobj.style.background = "#777"; Bgobj.Style.Filter = "progid: dimaTransform.microSoft.Alpha (Stil = 3, Opazität = 25, FinishoPacity = 75"; Bgobj.Style.Opacity = "0,6"; bgobj.style.left = "0"; Bgobj.Style.Height = SheIlt + "PX"; MSGOBJ.Style.Background = "White"; Genf, Arial, Helvetica, sans-serif "; "PX"; title.style.margin = "0"; Titel.Style.Opacity = "0,75"; title.innerHtml = "close"; document.getElementById ("msgdiv"). appendChild (Titel); ajax_form (url) {$ .post (url, {action: "post"}, function (data) {salert (data);}, "html");} </script>Verwendung:
Kopieren Sie den Code wie folgt: <a href = '#' onclick = "ajax_form ('http: //localhost/create_user_form.html');"> Test </a>
PS: Das Code -Layout scheint nicht zufriedenstellend zu sein. Hier empfehle ich Ihnen mehrere Code -Formatierungs -Tools. Ich glaube, dass es in der zukünftigen Programmierentwicklung verwendet werden kann:
C Sprachstil/HTML/CSS/JSON -Code -Formatierung und Verschönerungswerkzeuge:
http://tools.vevb.com/code/ccode_html_css_json
Online -Tools für JavaScript -Code Verschönerung und Formatierung:
http://tools.vevb.com/code/js
JavaScript Code Verschönerung/Komprimierung/Formatierung/Verschlüsselungstools:
http://tools.vevb.com/code/jscompress
Online -JSON -Code -Überprüfung, Inspektion, Verschönerung und Formatierungswerkzeuge:
http://tools.vevb.com/code/json
JSON -Code Online -Formatierung/Verschönerung/Komprimierung/Bearbeitung/Konvertieren von Tools:
http://tools.vevb.com/code/jsoncodeFormat
For more information about JavaScript, please check this site's special topics: "Summary of Ajax Operation Skills in JavaScript", "Summary of JSON Operation Skills in JavaScript", "Summary of JavaScript switching effects and techniques", "Summary of JavaScript search algorithm techniques", "Summary of JavaScript animation effects and techniques", "Summary of JavaScript errors and debugging Techniken "," Zusammenfassung von JavaScript -Datenstrukturen und Algorithmus -Techniken ", Zusammenfassung von JavaScript -Traversal -Algorithmen und -Techniken" und "Zusammenfassung der Verwendung von JavaScript -Mathematikoperationen"
Ich hoffe, dieser Artikel wird für JavaScript -Programme aller hilfreich sein.