jQuery实现点击文本框弹出热门标签的提示效果

2020-05-23 06:22:32易采站长站整理


<!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>
<title>jQuery实现点击文本框弹出热门标签的提示示例_网页代码站</title>
<style type=”text/css”>
body {
font-size:12px;font-family:Arial;
}
#m_tagsItem {
background:#fff;
position:absolute;
top:0px;
left:0px;
overflow:hidden;
width:590px;
*width:561px;
width:561px9;
padding:10px;
border:1px solid #ccc;
z-index:1000;
display:none;
}
#m_tagsItem p {
text-align:left;
line-height:22px;
padding:2px 0;
margin:0;
border:0;
}
#m_tagsItem span {
font-weight:bold;
}
#m_tagsItem a {
margin:0 5px;
}
.m_tagsname {
color:#999;
vertical-align:middle;
font-size:12px;
text-indent:3px;
line-height:20px;
}
#tagClose {
font-size:12px;
color:#888;
cursor:pointer;
position:absolute;
top:2px;
right:2px;
}
</style>
<script src=”http://www.webdm.cn/themes/script/jquery.js”></script>
<script language=”javascript”>
(function ($) {
$.fn.bgIframe = $.fn.bgiframe = function (s) {
if ($.browser.msie && /6.0/.test(navigator.userAgent)) {
s = $.extend({
top: ‘auto’, // auto == .currentStyle.borderTopWidth
left: ‘auto’, // auto == .currentStyle.borderLeftWidth
width: ‘auto’, // auto == offsetWidth
height: ‘auto’, // auto == offsetHeight
opacity: true,
src: ‘javascript:false;’
}, s || {});
var prop = function (n) { return n && n.constructor == Number ? n + ‘px’ : n; },
html = ‘<iframe class=”bgiframe”frameborder=”0″tabindex=”-1″src=”‘%20+%20s.src%20+%20′”‘ +
‘style=”display:block;position:absolute;z-index:-1;’ +
(s.opacity !== false ? ‘filter:Alpha(Opacity=’0’);’ : ”) +
‘top:’ + (s.top == ‘auto’ ? ‘expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+’px’)’ : prop(s.top)) + ‘;’ +
‘left:’ + (s.left == ‘auto’ ? ‘expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+’px’)’ : prop(s.left)) + ‘;’ +
‘width:’ + (s.width == ‘auto’ ? ‘expression(this.parentNode.offsetWidth+’px’)’ : prop(s.width)) + ‘;’ +
‘height:’ + (s.height == ‘auto’ ? ‘expression(this.parentNode.offsetHeight+’px’)’ : prop(s.height)) + ‘;’ +
‘”/>’;
return this.each(function () {