<script>
function myFunction()
{
    alert("你好,我是一个消息!");
}
</script>

<input type="button" onclick="myFunction()" value="显示警告框">