资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
jquery 弹出公告功能代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>jquery 弹出公告</title> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20type%3D%22text%2Fjavascript%22%20src%3D%22http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.3.2%2Fjquery.min.js%22%3E%3C%2Fscript%3E"><style> *{margin:0;padding:0;font-size:12px;} li{float:left;width:100px;border:1px solid #ccc;list-style:none;text-align:center;} h3{margin:20px auto;text-align:center;} input{width:120px;height:30px;cursor:pointer;} #notice{position:absolute;width:400px;padding:20px;background:#eee;border:1px solid #ccc;left:10px;top:10px;display:none;} </style> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%3E%20%0D%0A%24(function()%7B%20%0D%0A%24('%23open').click(function()%7B%20%0D%0A%24('%23notice').slideDown()%3B%20%0D%0A%24('%23texta').val('%E8%B1%AA%E6%83%85').select()%3B%20%0D%0A%7D)%3B%20%0D%0A%24('%23closed').click(function()%7B%20%0D%0A%24('%23notice').slideUp()%3B%20%0D%0A%7D)%3B%20%0D%0A%7D)%3B%20%0D%0A%3C%2Fscript%3E"></head> <body> <h3> <input id="open" type="button" value="弹出公告" /> <input id="closed" type="button" value="关闭公告" /> </h3> <div id="notice"> <textarea name="" id="texta" cols="30" rows="10"> </div> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程