confirm和alert的区别

来源:百度知道 编辑:UC知道 时间:2024/04/30 12:15:52
在JS中,confirm和alert都是弹出窗口,他们有区别吗?
知道你说的意思是什么,但是在表单验证的时候,用的一般都是alert,点确认后也可以控制表单是否提交啊?还是有点似懂非懂

confirm
[kən'fɜːm] (作动词,名词形式为confirmation)

1、证实,证明(情况属实)

例句:This confirms what I suspected all along.

这证实了我一直以来的怀疑。
2、(某人)证实,肯定,确认
例句:Can you confirm this?

这个你能确定吗?
3、(通常指通过信件或电话)确定,确认(安排或预约)
例句:You make the reservation, and I'll confirm it in writing.

你来预订,我会去函确认。

4、为…施坚振礼(或坚信礼)(从而正式成为基督教会的成员)
例句:He was confirmed as a member of the Church of England.

他领受了坚振礼,成为英国国教会的一员。
5、使坚定,使确信(自己的决定、信仰或观点)
例句:It has confirmed me in my decision not to become a nun.

这使我更加坚定了不做修女的决心。
6、加强,巩固(地位、角色或权力)
例句:Williams has confirmed his position as the world's number one snooker player. 威廉姆斯巩固了自己世界头号斯诺克选手的地位。

alert [ə'lɜːt] (可作名词、动词和形容词)

1、n. 警戒,警惕;警报
例句:We should stand by on a hurricane alert .
在暴风雨警戒期间我们应加戒备。