English 中文(简体)
如何使这个模态窗口正常工作?
原标题:how to get this modal window to work correctly?

我有3个关于eric martin s模态窗口,我似乎无法理解。希望任何使用过此模态的人都能帮助我。我创建了一个基本的应用程序,您可以访问它,这样您就可以看到我当前拥有的模态窗口此处

下面是我目前拥有的模态窗口的完整代码:

Javascript:

 function plusbutton()
    {

    $(".previouslink").modal(); 

    return false;
}

Html:

<table id="plus" align="center">
<tr>
<th>
<a href="previousquestions.php" class="previouslink" onclick="return plusbutton();">
<image src="Images/plussign.jpg" width="30" height="30" alt="Look Up Previous Question" class="plusimage"/>
</a>
<span id="plussignmsg">(Click Plus Sign to look <br/> up Previous Questions)</span>
</th>
</tr>
</table>

问题1:当您在应用程序中单击加号时,它会在模式窗口中显示我不想要的加号,为什么它会在模态窗口中显示加号,我该如何删除它?

问题2:在模态窗口的右上角,它应该显示一个关闭按钮(x的图像),但它没有显示关闭按钮。现在在css中,关闭目录按钮是这样的:

background:url(/images/x.png); 

现在这是目录,因为要从css页面转到图像,你需要进入“images”文件夹,然后在那里有“x.png”图像。

问题3:如果你查看我的html,你会看到在我的超链接中,我确实想链接perviousquestions.php页面。所以我想要的是,当用户点击加号按钮时,会出现一个模态窗口,显示“previousquestions.php”页面中的信息。如何实现这一目标?

非常感谢

最佳回答

您希望在模态窗口中显示的信息,需要放在单独的位置。你这么说是在做什么

$(".previouslink").modal();

就是你希望父元素中的所有内容都是模态窗口的内容。previouslink。

尝试将内容移动到另一个span或div中,这样当模式弹出时,您就有了所需的内容。

对于background:url,请尝试在.png之前和之后使用a。

类似 background:url(/图像/x.png);

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签