Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/402.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 设置消息()的显示时间_Javascript_Jquery_Html - Fatal编程技术网

Javascript 设置消息()的显示时间

Javascript 设置消息()的显示时间,javascript,jquery,html,Javascript,Jquery,Html,我显示的错误消息如下: showErrorMessage("Description and Measure fields cant be empty"); 问题是它没有停留足够长的时间让人们阅读信息。那么我该如何让它持续更长时间呢 下面是我使用它的函数` function addGoal() { var description = $('.description').val(); var measure = $('.measure').val(); if((desc

我显示的错误消息如下:

showErrorMessage("Description and Measure fields cant be empty");
问题是它没有停留足够长的时间让人们阅读信息。那么我该如何让它持续更长时间呢

下面是我使用它的函数`

    function addGoal()  {

    var description = $('.description').val();
    var measure = $('.measure').val();
if((description!="")&&(measure!="")){
//do some thing
}else {
showErrorMessage("Description and Measure fields cant be empty");
}
`

对不起,这是我的功能

function showErrorMessage(message){
        noty({
            text: message,
            type: "error",
            theme: "gmailTheme",
            layout: "topCenter",
           });
    }
超时:false,//关闭事件的延迟。将粘性通知设置为false


您在谈论哪种技术?我们需要查看
showErrorMessage()
函数中的代码,以便提供帮助。目前这个问题完全无法回答。请添加上下文,以便问题可以理解。
showErrorMessage()
你能发布你的函数吗?