警报框以一种方式工作,而不是以另一种方式

Alert Box works in one way not in other Way

本文关键字:方式 工作 另一种 一种      更新时间:2023-09-26

当我写这段代码时,警告框没有出现-

$(document).ready(function() {
alert('Welcome to StarTrackr! Now no longer under police
investigation!);
});

但是当我写这段代码时警告框出现了=

$(function() {
alert('Ready to do your bidding!');
});

原因是什么?

您需要关闭第一个警告框中的字符串。您可以看到语法高亮显示了整个部分。

$(document).ready(function() {
alert('Welcome to StarTrackr! Now no longer under police investigation!');
});