Bootstrap Modal没有显示

时间:2017-01-13 17:56:00

标签: twitter-bootstrap

FileInputStream fis = new FileInputStream(filePath);
int length = (int) new File(filePath).length();
byte[] buffer = new byte[length];
fis.read(buffer, 0, length);

for (int i = 1; i < hex.length(); i++){
                if(i %2 == 0){
                    String test = String.valueOf(hex.charAt(i-2))+ String.valueOf(hex.charAt(i-1));

                    System.out.println("Hex: "+test+" hexadecimal: "+Integer.parseInt(test, 16)+" char: "+(char) Integer.parseInt(test, 16));
                }
            }

1 个答案:

答案 0 :(得分:1)

触发要显示模式的按钮上的

target属性应为data-target。我还要将type="button"添加到此按钮:

<div class="continer">
    <div class="row">
        <div class="col-md-2">
            <button type="button" class="btn btn-primary" data-target="#loginmodal" data-toggle="modal">Launch Modal</button>
            <div class="modal" id="loginmodal" tabindex="-1" role="dialog">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button class="close" data-dismiss="modal">&times;</button>
                        </div>
                        <div class="modal-body">
                            <form>
                                <div class="form-group">
                                    <label for="Username">Username</label>
                                    <input type="text" name="text" class="form-control">
                                </div>
                                <div class="form-group">
                                    <label for="Password">Password</label>
                                    <input type="Password" name="text" class="form-control">
                                </div>
                            </form>
                        </div>
                        <div class="modal-footer">
                            <button class="btn btn-primary" data-dismiss="modal">Close</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>