[英]Trying to display content on click using css (active) and javascript. How can I keep the content displaying?
[英]Displaying different content on the same panel using Javascript.
我在网站上有一个锚标签列表。 如何根据单击的标签来更改面板的内容。 我不想更改页面。 我猜我将需要使用JQuery,但我不想使用选项卡。 请帮忙。 谢谢。
当“锚点”单击“触发此”以拉出新面板时,test.php将完成工作。 然后只需插入返回的html。
您将必须包括jQuery库
$.post("test.php", { PanelNum: Num},
function(data) {
$("#panel").html(data)
});
$(document).ready(function() {
$('a').click(function(event) {
event.preventDefault();
**code to change panel content, whether it be an
ajax request or simple $('selector').html()**
});
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.