一個變量在我的程序我使用這個插件jquery顯示在jsp頁面通知。顯示通過jQuery通知
我想是從一個HTML表中獲取的值,並在通知中的文本顯示它,我的嘗試是如下
<script type="text/javascript">
$(document).ready(function() {
var table = document.getElementById("item");
for (var i = 1; i<= table.rows.length; i++) {
val=table.rows[i].cells[1].innerText;
if(table.rows[i].cells[10].innerHTML >= table.rows[i].cells[15].innerHTML)
{
//alert(val);
jNotify(
' Re-order level' ,
{
autohide:false,
TimeShown:3000,
HorizontalPosition:'center'
});
}
}
});
</script>
在代碼中的變量val
的是越來越警覺消息框但不在jNotify
通知中。 請幫助。
'jNotify(VAL,{[...]});'? –
@FabrícioMatté - http://www.myjqueryplugins.com/jquery-plugin/jnotify – MarcinWolny
對我的作品http://jsfiddle.net/JkYzY/ @MarcinWolny我的意思是OP嘗試這種語法。 –