jQuery多版本的使用,同一文件多个版本引用-阿里云开发者社区

开发者社区> 开发与运维> 正文

jQuery多版本的使用,同一文件多个版本引用

简介:
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head  >
<title></title>
<script src="/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="/js/jqueryInline1.7/jquery.validationEngine-cn.js" type="text/javascript"></script>
<script src="/js/jqueryInline1.7/jquery.validationEngine.js" type="text/javascript"></script>
<link rel="stylesheet" href="/js/jqueryInline1.7/validationEngine.jquery.css" type="text/css" media="screen" title="no title" charset="utf-8" />
<link rel="stylesheet" href="/js/jqueryInline1.7/template.css" type="text/css" media="screen" title="no title" charset="utf-8" />

<link rel="stylesheet" type="text/css" href="/js/thickbox3.1/thickbox.css">
<script type="text/javascript" src="/js/thickbox3.1/thickbox.js"></script>
<link href="/css/master.css" rel="stylesheet" type="text/css" />
<link href="/css/style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="/js/jquery.form.js"></script>
<script type="text/javascript" src="/js/uploadImg.js"></script>
<link href="/css/uploadImg.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
      jQuery(function($) {
          
          $("#fileupload").wrap("<form id='myupload' action='/news/index/uploadpic' method='post' enctype='multipart/form-data'></form>"); //函数处理
          var gaodu1 = $(window).height()-137;
          var kuandu1 = $(window).width()-20;
          
           $("#waikuan").height(gaodu1);
           $("#waikuan").width(kuandu1);
         
          //$("body").append("<div id='main_bg'/>"); 
          //$("#main_bg").append("<img src='/images/menubg.png' id='bigpic'>"); 
        
          cover(); 
          $(window).resize(function(){ //浏览器窗口变化 
              cover(); 
          }); 
          //验证
          $("#form1").validationEngine();

          //提交
          $("#submit").click(function(){
              $("#form1").submit();
          });
      });

function cover(){ 
    var win_width = $(window).width(); 
    var win_height = $(window).height(); 
    $("#bigpic").attr({width:win_width,height:win_height}); 
} 

$(function(){
  //$.toSelect("user_name","selectid");
  $(".stripe_tb tr").addClass("bgwhite");
  $(".stripe_tb tr").mouseover(function(){
   //如果鼠标移到class为stripe_tb的表格的tr上时,执行函数
     // $(this).addClass("over");
   })
    .mouseout(function(){
        //给这行添加class值为over,并且当鼠标一出该行时执行函数
      $(this).removeClass("over");
    }) //移除该行的class
      $(".stripe_tb tr:even").addClass("alt");
//给class为stripe_tb的表格的偶数行添加class值为alt
});

</script>

<!--编辑器begin-->
<script src="/js/ueditor/jquery.js" type="text/javascript"></script>
<link href="/js/ueditor/themes/default/_css/umeditor.css" type="text/css" rel="stylesheet">
<script type="text/javascript" charset="utf-8" src="/js/ueditor/umeditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/ueditor/editor_api.js"></script>
<script type="text/javascript" src="/js/ueditor/lang/zh-cn/zh-cn.js"></script>
<!--编辑器end-->
<script>
  jQuery(function($) {
    var ue = UM.getEditor('myEditor');
    //自动切换提交地址
    var doc=document,
    version=ue.options.imageUrl||"php",
    form=doc.getElementById("form1");
  });
</script>

</head>
<body>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" style="position:absolute;" class="yuanjiao" >
  <tr>
          <td height="99%"  ><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"  class="yuanjiao">
              <tr>
                <td valign="top"><!--table begin-->
                  
                  <div class="title">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="86%" class="classname"><span>在线投稿</span></td>
                        <td class="14%" align="right"><a  id='TB_closeWindowButton' title='Close'><img src='/images/closebt.png'/></a></td>
                      </tr>
                    </table>
                  </div>
                  <form id="form1" name="form1" method="post" action="">
                  <div style=" background:#E5E5E5;  " class="grey2" >
                    <table width="100%" border="0" cellspacing="1" cellpadding="0"  class="stripe_tb grey3"  >
                      <input type="hidden" name="id" value="<!--{$aData.id}-->">
                      <tr>
                        <td width="30%" height="56" align="right" >请选择类别:</td>
                        <td width="70%" ><!--{html_options class="level ffb-input" name="level" options=$aLevel selected=$aData.level|default:'0'}--><span class="red">*</span></td>
                      </tr>
                      
                      <tr>
                      <td width="30%" height="56" align="right" >标题:</td>
                        <td width="70%" >
                          <input name="name" type="text" class="validate[required] input1 ml10" value="<!--{$aData.name}-->"><span class="red">*</span></td>
                      </tr>

                      <tr>
                      <td width="30%" height="56" align="right" >内容:</td>
                        <td width="70%" >
                          <!--style给定宽度可以影响编辑器的最终宽度-->
                          <script type="text/plain" id="myEditor" style="width:600px;height:440px;">
                          <p>新闻内容</p>
                          </script>
                        </td>
                      </tr>

                      <tr>
                      <td width="30%" height="56" align="right" >缩略图:</td>
                        <td width="70%" >
                          <div id="upimg">
                          <div id="showimg"></div>                           
                          <div class="btn"> 
                               <span>添加图片</span> 
                               <input id="fileupload" type="file" name="pic[]">
                               <input type="hidden" value="<!--{$aData.icon}-->" class="imgsrc" name="icon">
                          </div>
                          </div> 
                        </td>
                      </tr>
                      

                    </table>
                  </div>
                </form>
                  <div class="tijiao1 mt20"><span id="submit">提交审核</span></div>
                  <!--table over--></td>
                </td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>
复制代码

将相应的代码,引入到相应的代码块下。



本文转自TBHacker博客园博客,原文链接:http://www.cnblogs.com/jiqing9006/p/3459724.html,如需转载请自行联系原作者

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

分享:
开发与运维
使用钉钉扫一扫加入圈子
+ 订阅

集结各类场景实战经验,助你开发运维畅行无忧

其他文章