- javascript:alert('hello!');
 
- data:text/html,
 Hello, world!
地址栏输入:

- data:text/html,
 
控制台输入:
- document.body.contentEditable='true';
 
- var a = document.createElement('a');
 - a.href = 'https://www.maomin.club';
 - console.log(a.host); // www.maomin.club
 
 我是内容- console.log(app.textContent) // 我是内容
 
This won't display
- const text = document.getElementById('template').textContent;
 - console.log(text); //
 This won't display
- *{
 - cursor: none!important;
 - }
 
- p {
 - color: transparent;
 - text-shadow: #111 0 0 5px;
 - }
 
- style{
 - display: block;
 - }
 - body { color: blue }
 
- this content will have a constant aspect ratio that varies based on the width.
 
- if (window.location != window.parent.location) window.parent.location = window.location;
 
- function generateRandomAlphaNum(len) {
 - var rdmString = "";
 - for (; rdmString.length < len; rdmString += Math.random().toString(36).substr(2));
 - return rdmString.substr(0, len);
 - }
 
- console.log(~~1.2); // 1
 
                本文名称:前端开发中这些小技巧,你知道几个?
                
                网站链接:http://www.csdahua.cn/qtweb/news12/449912.html
            
网站建设、网络推广公司-快上网,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 快上网