Javascript 在将缩略图链接到模态时面临问题

Javascript 在将缩略图链接到模态时面临问题,javascript,jquery,html,css,twitter-bootstrap,Javascript,Jquery,Html,Css,Twitter Bootstrap,我正在尝试使用以下代码链接我使用引导框架(javascript)模型创建的Thumnail x 混血儿 《愤怒的葡萄》是约翰·斯坦贝克写的一部美国现实主义小说,出版于1939年。这本书获得了国家图书奖和普利策小说奖,1962年斯坦贝克获得诺贝尔奖时,这本书被引到了显著位置 接近 x 水 兰科植物是一个种类繁多、分布广泛的开花植物科,其花朵通常五彩缤纷、芳香四溢,俗称兰科。与菊科植物一样,它们也是开花植物中最大的两个科之一 植物。兰科植物约有27800种,分布于880属 接近 为了使引

我正在尝试使用以下代码链接我使用引导框架(javascript)模型创建的Thumnail




x 混血儿 《愤怒的葡萄》是约翰·斯坦贝克写的一部美国现实主义小说,出版于1939年。这本书获得了国家图书奖和普利策小说奖,1962年斯坦贝克获得诺贝尔奖时,这本书被引到了显著位置

接近 x 水 兰科植物是一个种类繁多、分布广泛的开花植物科,其花朵通常五彩缤纷、芳香四溢,俗称兰科。与菊科植物一样,它们也是开花植物中最大的两个科之一 植物。兰科植物约有27800种,分布于880属

接近
为了使引导程序能够正常工作,您基本上需要jquery库、引导程序js和引导程序css。下面的代码片段将帮助您实现它

<script src="https://code.jquery.com/jquery-2.2.3.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel='stylesheet' type='text/css' />

您的缩略图部分应为:

<!--thumbnail section-->
<section class="container">
    <div class="row add-bottom text-center">
        <a href="#migrant" class="thumbnail thumbnailstyle" data-toggle="modal">
            <img src="~/Images/migrant100.jpg" alt="Project Image" class="imgStyle img-responsive center-block">
        </a>
        <br />
        <br />
        <a href="#water" class="thumbnail thumbnailstyle" data-toggle="modal">
            <img src="~/Images/water.jpg" alt="Project Image1" class="imgStyle img-responsive center-block" id="img2">
        </a>
    </div>
</section>



您的模态内容:

    <div class="modal fade" id="migrant" role="dialog">
    <div class="modal-dialog">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <div class="modal-content">
            <div class="modal-header">
                <h3>Migants</h3>
            </div>
            <div class="modal-body">
                <div class="modal-footer txt_center">
                    <p>
                        <img src="~/Images/migrant100.jpg" alt="migrant01" class="pull-right">The Grapes of Wrath is an American realist novel written by John Steinbeck and published in 1939. The book won the National Book Award and Pulitzer Prize for fiction, and it was cited prominently when Steinbeck was awarded the Nobel Prize in 1962
                    </p>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="water" role="dialog">
    <div class="modal-dialog">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <div class="modal-content">
            <div class="modal-header">
                <h3>Water</h3>
            </div>
            <div class="modal-body">
                <div class="modal-footer txt_center">
                    <p>
                        <img src="~/Images/water.jpg" alt="water01" class="pull-right">The Orchidaceae are a diverse and widespread family of flowering plants, with blooms that are often colourful and often fragrant, commonly known as the orchid family. Along with the Asteraceae, they are one of the two largest families of flowering
                         plants. The Orchidaceae have about 27,800 currently accepted species, distributed in about 880 genera
                    </p>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>

&时代;
混血儿

《愤怒的葡萄》是约翰·斯坦贝克写的一部美国现实主义小说,出版于1939年。这本书获得了国家图书奖和普利策小说奖,1962年斯坦贝克获得诺贝尔奖时,这本书被引到了显著位置

接近 &时代; 水 兰科植物是一个种类繁多、分布广泛的开花植物科,其花朵通常五彩缤纷、芳香四溢,俗称兰科。与菊科植物一样,它们也是开花植物中最大的两个科之一 植物。兰科植物约有27800种,分布于880属

接近
您不能使用
文件系统路径
链接网页中的任何内容。那么,如何将上述脚本的模态链接到缩略图?为了理解,它适用于所有类型的相对路径。我想为上述示例中创建的模态添加“下一个”和“上一个”按钮导航器。我想将其与添加到模态中的段落一起实现。我将如何做到这一点?