The problem of single and double quotation marks in PHP code is a very important problem, which can cause a lot of trouble when used improperly. First record the trouble of writing alert today. When I do login, I want to pop up a prompt to say that login is successful. Does not appear when the alert statement is written. In fact, the single double quotation marks are wrong. The correct statement should be:I
First, select the COM tab in the project reference to add the Microsoft HTML Object Library
Add a reference to the mshtml namespace.
See the code below
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->IHTMLWindow2 win = (IHTMLWindow2) hdoc. Window. DomWindow;
String s = "function confirm (){";
S + = "return true ;";
S + = "}";
S + = "function alert (){}";
Win.exe cScript (s, "javascript ");
In this w
If response. write (""); click "OK", which may cause "dislocation" of the page ";
Encapsulate the code into a class (called pagehelper. CS), which can be conveniently called on other pages;
For example, you can call page. Alert (this, "") on other pages. The effect is the same as that of the above Code. Do you have to say something different? That is, this writing method is much more perfect than above.
You can also have the second parameter, that is,
1. Introduction to blockui
It is a plug-in of the jquery framework and is specially used for prompt boxes and modal windows.
Address: http://www.malsup.com/jquery/block/
The specific usage method and demo are clearly written. I will not describe them one by one.
2. Rewrite alert in Javascript so that all the places where alert is called have a uniform style
Here I provide a JS File
$. Blockui. defaults. ove
The one I used in the previous project was also written by myself, but it was based on JQ. Recently, I saw that the JS question posted by Renren is similar to this one, so I used Native js to rewrite it again:
JS
(Function (WIN) {var tips = {'title': 'treasure trease', 'enter': 'OK', 'cancel': 'cancel', 'close ': 'Close '}, isie6 =! Window. XMLHttpRequest, cssloaded = false, isopen = false, loadcss = function () {If (cssloaded) return; var csshref = 'dialog.css '; var style = document. createele
PHP implementation is similar to the alert () prompt box in js, jsalert. PHP implementation is similar to the alert () prompt box in js. jsalert is mainly used to add judgment prompts, jump, return, and refresh. The code for copying the code is as follows: *** JS prompt jump * @ param $ tip pop-up window PHP implementation is similar to the alert () prompt box in
The usefulness of Console.log ()It's mostly handy for your modal JavaScript, and you can see what you're outputting in the page.His advantages compared to alert are:He can see structured things, if it is alert, fade out an object is [Object Object], but the console can see the contents of the object.Console does not interrupt the operation of your page, if you use alert
Demo Address:
Http://runjs.cn/detail/miwszbne
Share Description:
The nth time to build the wheel, only for the simplest call, jquery simulation alert and Confirm's window plugin
Call Method:
$.alert (' your message ');
$.alert (' Your message ', function () {
$.alert (' Click OK button ')
};
$.confirm ('
right.Usually find the problem of small y, are some strange complex problems, if only the database, and the operating system/middleware/storage and other aspects of lack of sufficient understanding, often can not solve their complex problems.It seems that an uphill battle is inevitable ...3Start analysisFirst look at the database alert log:The next morning, to the customer site, the first customer to me about yesterday's failure situation: February 1
PHP implements General alert functions. PHP: how to implement general alert functions this article mainly introduces PHP's method for implementing general alert functions. The example shows how to implement prompt information for php custom alert functions, very practical PHP method for implementing general
First type: Alert () methodThe alert () method is the easiest to use in these three dialog boxes, and she can be used to simply and clearly display the text information in the alert () parentheses in the dialog box, which we call the Alert dialog box, where the information to display is enclosed in parentheses, and the
During the test, it is found that alert will interrupt the timer function of settimeout. After the dialog box is closed, the time of settimeout starts to be timed again, instead of from the break, if you are interested, you can learn that alert will interrupt the timer function of settimeout. After the dialog box is closed, the time of settimeout starts to start timing again, rather than from the center.
script language="JavaScript">
function myObj() {
var total = 0;
}
MYOBJ. Prototype. Add = function(a,b) {
this. Total = a + b;
}
MYOBJ. Prototype. toString = function() {
return this . Total;
}
var obj = new myObj();
Obj. Add(1,2);
Console. Log(obj); //The output here is MyObj
Alert(obj); //The output result here is 3
Script>
Reason:Console.log () can print any type of data.
phone is really convenient to use, at any time to the Internet (as long as there is a network), no longer need to manually switch. However, this setting will unknowingly deplete our network traffic (local tyrants here).Install traffic monitoring software, a lot of traffic monitoring software settings slightly cumbersome, but also need root, probably not everyone is willing to do so.And I want to design a simple and easy-to-use network status Alert ap
See Oracle BUG: error message about the alert of Rman backup.Symptom:During database backup, the alert Log prompts an error message and provides a trc file with detailed error information.
Recommended reading:
RMAN: Configure an archive log deletion policy
Basic Oracle tutorial-copying a database through RMAN
Reference for RMAN backup policy formulation
RMAN backup learning notes
Oracle Database Backup encr
Webbrowser shielding alert is implemented by redefinition of alert and confirm. Relatively simple.
Code As follows:
Add com reference Microsoft HTML
Object Library
Using Mshtml;
Private Void Webbrowser1_navigated ( Object Sender, webbrowsernavigatedeventargs E){Ihtmlwindow2 win = (ihtmlwindow2) webbrowser1.document. Window. domwindow; String S = @" Function confirm (){ " ;S + = @" Return true;
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.