本文介绍了陶氏到我在弹出框中显示DIV的内容。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我在我的项目中使用这个javscript库来弹出消息
[]
我遇到的问题是我无法在警告弹出框中显示div中包含的消息。
Hello ALL,
I am using this javscript library for pop up messages in my project
http://fabien-d.github.io/alertify.js/[^]
The issue i am having is that i am unable to display a message contained in a div in an alert pop up box.
<div id ="mydiv"> Display this message in an alert box</div>
<button > show message </button>
<script type="text/javascript">
function message() {
alertify.alert(document.getElementById("mydiv").innerHTML);
}
</script>
当页面加载时...消息显示在页面上而不是在弹出框中,当我点击显示警告弹出时,它没有任何内容。
我能做错什么?
When the page loads .. the message is displayed on the page instead of in a pop up box and when i click to display the alert pop up , there is nothing in it.
What could i be doing wrong??
推荐答案
这篇关于陶氏到我在弹出框中显示DIV的内容。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!