PHP and JS Implementation Popup dialog instance sharing

Source: Internet
Author: User
JS can implement pop-up dialog box, this article is mainly to share with you PHP and JS implementation pop-up dialog box instance, I hope to help everyone.

1. PHP Popup dialog box

Popup dialog box <?phpecho "<script language=\" javascript\ ">alert (\" Hello \ ");</script>";? >//Close the current page echo   "<script> window.self.close (); </script>";


2. If you want to return to the original page after the PHP popup dialog box can be written

<?phpecho "<script language=\" javascript\ ">\r\n"; echo "alert (\" Hello "); \ r \ n"; echo "history.back (); \ r \ n"; echo "</script>"; exit; >

3. If you need a php pop-up dialog box and replace the original page with a new page (change the current history), the original page can be written like this

<?phpecho "<script language=\" javascript\ ">\r\n"; echo "alert (\" Hello \ "); \ r \ n"; echo "location.replace (\" http ://www.asm32.net/\ "); \ r \ n"; Modify the Web address echo "</script>"; exit; >

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.