用CSS彈出對話方塊

來源:互聯網
上載者:User
       原理非常簡單,就是把背景圖片的地址改為JAVASCRIPT代碼,當頁面載入的時候就會JAVASCRIPT代碼。也可以放其他簡單的代碼。
 1<html>
 2<head>
 3<title>CSS彈出對話方塊</title>
 4<style type="text/css"> 
 5body {}{ 
 6background-image: url('javascript:alert("你要說的話");')
 7}
 8</style>
 9</head>
10<body>
11本文內容
12</body>
13
14</html>
15

相關文章

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.