你必须爱我,恶搞代码实现丨技术开发分享录

你必须爱我,恶搞代码实现

{{ detail.nickname }}

转载 翻译 {{ formatTime(detail.create_time) }} 字数 {{ detail.content && detail.content.length }} 阅读 {{ detail.read_num }} {{ formatTag(v) }}

"<iframe src=\"/htmls/articles/demo20201231171138.html\" frameborder=\"1\" width=\"700px\" height=\"450px\"></iframe>\n\n完整代码\n\n```html\n<html>\n<head>\n    <title>你必须爱我</title>\n    <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n    <script type=\"text/javascript\">\n    flag = 1\n    function f1() {\n        alert(\"多谢,你是对的\")\n    }\n    function f() {\n        if (flag == 1) {\n            Bn.style.top = 90\n            Bn.style.left = 500\n            flag = 2\n        } else if (flag == 2) {\n            Bn.style.top = 90\n            Bn.style.left = 50\n            flag = 3\n        } else if (flag == 3) {\n            Bn.style.top = 235\n            Bn.style.left = 360\n            flag = 1\n        }\n    }\n    </script>\n</head>\n<body>\n    <h1 style=\"position:absolute; left:220px; top:175px; width:auto; height:210px;\">你爱我吗?</h1>\n    <div id=\"By\" style=\"position:absolute; left:285px; top:235px; width:210px; height:210px;\">\n        <input type=\"button\" value=\" 爱 \" onclick=\"f1()\" />\n    </div>\n    <div id=\"Bn\" style=\"position:absolute; left:360px; top:235px; width:210px; height:210px;\">\n        <input type=\"button\" value=\"  不爱  \" onmouseover=\"f()\" />\n    </div>\n</body>\n</html\n````"
PS:写作不易,如要转裁,请标明转载出处。

如果此篇对您有帮助,可小额赞助,以兹鼓励!

猜你想看