本帖最后由 KeepCoding 于 2012-2-25 10:33 编辑
- <script type="text/javascript">
- <!--
- function addEvent(elem, type, fn, useCapture) {
- if(elem.addEventListener) { //DOM2.0
- elem.addEventListener(type, fn, useCapture);
- return true;
- } else if(elem.attachEvent) { //IE5+
- elem.attachEvent('on' + type, fn);
- return true;
- } else { //DOM 0
- elem['on' + type] = fn;
- }
- };
- addEvent(document.getElementById("e_fullswitcher") , 'click',function(){
- var obj = document.getElementById("custominfo_pmenu");
- if( obj ){
- if( this.getAttribute('isfullscreen') == 1){//当前已经全屏
- if( this.getAttribute('oldstyle') == '' || this.getAttribute('oldstyle') == 'block' ){
- obj.style.display = this.getAttribute('oldstyle') ;
- }
- this.setAttribute("isfullscreen",0);
- }else{
- this.setAttribute("isfullscreen",1);
- this.setAttribute('oldstyle',obj.style.display ) ;
- obj.style.display = 'none';
- }
- }
- });
- //WrittenBySigma:t.qq.com/duxing
- //-->
- </script>
复制代码 针对此问题,我写了段代码,目前表现良好。
添加位置:
template\bf_bbs\forum\post.htm 最下边就行。 |