如何创建弹出模式而不是警报

时间:2017-03-02 23:13:53

标签: javascript jquery html css

我是一个简单的if语句,并试图创建一个弹出窗口而不是警告但我没有在这里得到它是我的代码:

if(values == ''){
    $('body').css('cursor','auto');
    alert("Blah Blah...");      
}

我正在尝试的是

if(values == ''){
    $('body').css('cursor','auto');
    $('body').show('#myModal');
}

2 个答案:

答案 0 :(得分:0)

关闭,但应该在匹配的元素上调用jQuery的.show()

use std.textio.all;

entity rightjustd is
end entity;

architecture foo of rightjustd is
    type filltype is (NOFILL, ZEROFILL);
    function to_dstring (
        value:      in integer;
        field:      in width := 0;
        just:       in side := RIGHT;
        fill:       in filltype := NOFILL
    ) return string is
        variable retstr: string (1 to field);
    begin
        if field = 0 then
            return integer'image(value);
        elsif field < integer'image(value)'length then 
            retstr := (others => '#');
        elsif fill = NOFILL  or just = LEFT then
            retstr := justify (integer'image(value), just, field);
        else  -- fill = ZEROFILL and just = RIGHT, field >= image length
            retstr  := justify (integer'image(abs value), just, field);
            for i in retstr'range loop
                if retstr(i) = ' ' then
                    retstr(i) := '0';
                end if;
            end loop;
            if value < 0 then
                retstr(1) := '-';
            end if;
        end if;
        return retstr;
    end function to_dstring;
begin
    process
    begin
        report to_dstring(-2456, 12, RIGHT, ZEROFILL);
        report to_dstring(-2456, 4, RIGHT, ZEROFILL);
        report to_dstring(-2456);
        report to_dstring(-2456, 12, LEFT, ZEROFILL) & '.';
        report to_dstring(-2456, 12, RIGHT);
        wait;
    end process;
end architecture;

答案 1 :(得分:0)

最有可能你需要将其更改为:

{{1}}