html折叠面板代码无法实现效果

html折叠面板代码无法实现效果,第1张

确认一下

<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">

<script src="//code.jquery.com/jquery-1.9.1.js"></script>

<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>

<link rel="stylesheet" href="http://jqueryui.com/resources/demos/style.css">

这几个文件有没有引入进来,有可能你的网慢,没有引入

<script language=javascript>

function f()

{

if(div1.style.display=="")

{

div1.style.display="none"

}

else

{

div1.style.display=""

}

}

</script>

<input type=button value=click onclick=f()>

<div id=div1>

这里的文字将折叠

</div>

重点:

1、div1.style.display="" //让层显示

2、div1.style.display="none" //让层隐藏

3、记得给我分!呵呵。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/zaji/6154152.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-16
下一篇 2023-03-16

发表评论

登录后才能评论

评论列表(0条)

保存