jQuery库:jquery-1.4.2.js用于作ajax
NiceJForms用于UI美化,没想到导入后冲突了,两个都没有效果了.
分开用时都可以用的.
我贴出部分代码参考:<!-- 用于Ajax部门刷新 -->
<script type="text/javascript" src="js/jquery-1.4.2.js"></script><!-- 用于美化UI -->
<script type="text/javascript" src="js/nicejforms.js"></script>
<style type="text/css" media="screen">@import url(css/niceforms-default.css);</style>
   <script type="text/javascript">
        $(document).ready(function(){
            $.NiceJForms.build()
        });
    </script>   <script type="text/javascript">
    /*
    1,Get module list
    */
    $(document).ready(function(){
        $.ajax({
            type:"POST",
            contentType:"application/json",
            url:"http://localhost/FDCService/FDCService1.asmx/GetModuleIDs",
            data:"{}",
            datatype:'json',
            success:function(result){
            try{
                $('#ModuleList').empty();
                     //alert(result.d);//alert result to test
                     $(result.d).each(function() {
                            $("#ModuleList").append("<option value='" + this + "'>" + this + "</option>");
                        });
                }catch(e){
                    alert(e); 
                }
              },
             error: function(result, status){
                if(status=='error'){
                    alert(result);
                }
             }
        });
    });
</script>