Typed.js 输入小于或大于时冻结网站
Typed.js freezes website when typing lesser than or greater than
我刚收到 typed.js 并且在输入 <body>
时遇到了一些问题,因此在网站上显示 <body>
。每当我尝试 运行 它时,它就会冻结。当字符串更改为 body
而不是 <body>
时,我的代码有效
HTML
<span class="typed"></span>
JS
$(function(){
$(".typed").typed({
strings: ["<body>"],
typeSpeed: 100
});
});
使用<
和>
转义<
和>
$(function() {
$(".typed").typed({
strings: ["<body>"],
typeSpeed: 100
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/typed.js/1.1.7/typed.min.js"></script>
<span class="typed"></span>
我刚收到 typed.js 并且在输入 <body>
时遇到了一些问题,因此在网站上显示 <body>
。每当我尝试 运行 它时,它就会冻结。当字符串更改为 body
而不是 <body>
时,我的代码有效
HTML
<span class="typed"></span>
JS
$(function(){
$(".typed").typed({
strings: ["<body>"],
typeSpeed: 100
});
});
使用<
和>
<
和>
$(function() {
$(".typed").typed({
strings: ["<body>"],
typeSpeed: 100
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/typed.js/1.1.7/typed.min.js"></script>
<span class="typed"></span>