问题
How to create those message box in php, just like the one in facebook. Or any reference that you could give me that deals with designing.
回答1:
You will have to use php's GD to create a message box. Alternatively, you can simply echo out the javascript's message box using php with a code similar to this:
if ($success) {
echo "<script>alert('information updated')</script>";
echo "<script>navigate('other.php')</script>";
exit();
} else {
//....failed to update info
}
回答2:
This has nothing to do with PHP, but is done on client side using HTML and Javascript.
Facebox is a very popular plugin based on JQuery.
This question has links to a number of others.
回答3:
It's less a PHP server-side issue, more a client-side thing. So, one thing you could look at is doing it with is jQuery Dialogs
回答4:
They are known as modal windows. Those are not achieved through PHP (although the content in them is loaded with PHP, so that might be what is making you think that). You can find many Facebook modal window clones, like Facebox.
回答5:
Most of the message boxes you see on websites such as Facebook are actually implemented in HTML, CSS and JavaScript. There are a number of examples of how to implement this with jQuery:
- jQuery Alert Dialog
- Quick and Dirty Modal Dialog
You could always wrap the code in a PHP function, however unless you are only using the message box in one place it would probably be simpler to put the code on each page.
来源:https://stackoverflow.com/questions/2093324/message-box-like-facebook