的onclick = "警告( 'HOLA!'); window.close()的;"

use*_*245 1 html javascript jquery onclick

我想知道是否有人可以帮我解决这个问题.这可能听起来有史以来最容易的问题.我刚刚开始使用jQuery.

在下图中,是否可以将"https://jsfiddle.net/vh6ptcrd/"替换为自定义消息?

在此输入图像描述

<div class="tile">
	<div class="img-bg"onclick="alert('This Click will take me to...');window.close();">
        <p>Click!</p>
	</div>
</div><!--.tile end -->
Run Code Online (Sandbox Code Playgroud)

在此先感谢您的帮助.

Cha*_*lie 5

不幸的是,这是不可能的.我建议使用类似"Sweet Alert"的内容:http://tristanedwards.me/sweetalert

它易于实现,看起来比香草警报更好.