7.6-7.7 JLL实习日志-AngularJs的实现+windows下连接数据库

来源:互联网 发布:tinycore apache 编辑:程序博客网 时间:2024/06/05 08:31
  1. Angullarjs的实现下拉框设置默认值的操作
    步骤1:确定作用的范围,在最大的div上加ng-app="myApp" ng-controller="myCtrl">
    步骤2 : 确定变量和方法,在对应的上加上ng-model="{{ field.html_name }}" ng-blur="update()"/>
    步骤3: AngulrJs 实现,首先取得下拉框的对象getElementById
    然后设置它的优先默认选项b.options[1].selected = true;
    步骤4:把对应的下拉框禁止改动,使用的disabled 的属性 b.setAttribute("disabled", true);

代码如下

  <script type="text/javascript">var app = angular.module('myApp', []);app.controller('myCtrl', function($scope){    var b = document.getElementById("id_Pref_Brand_Name_Flg");    $scope.update = function(){    if($scope.Brand_Name != ''&&$scope.Brand_Name_SC!=''){       b.options[1].selected = true; //chinese    }else{ if($scope.Brand_Name){b.options[1].selected = true; //ENglish b.setAttribute("disabled", true);        }else{ b.options[2].selected = true;  b.setAttribute("disabled", true);        }        };    }});</script>

2.windows 下安装数据库的步骤,连接数据库的步骤
进入 python27 script \命令??进入以后使用pip 安装
步骤1 :安装python,pymssql
安装的方式有两种,第一种是使用pip方式,进入到python27路径下的pip.exe路径中执行:pip install pymssql
第二种方式下载安装包:
到达安装包的路径打开安装包诶然后到这个文件夹下面以后才可以执行python setup.py install 执行安装


3.python 路径下的文件夹的显示
windows 下python路径下文件的作用,lib一般放库文件,也就是后缀.lib的,include 一般包含头文件目录,bin表示binary目录,一般都是dll,exe等


  1. 有关于前端样式的很有用的网站
http://preview.themeforest.nethttp://bootstrapbay.com/themes/admin-dashboardhttp://www.shejidaren.com/smoke-jquery-pugin-for-bootstart.htmlhttp://jqueryfuns.comjQueryfuns 是国内的,可以找到对应的样式风格

样式的调整–灰色表示没有生效,划掉的部分表示被重写了,两种是不需要理,color-background用的很多的 ,font-color 尽量少用,border-right: 表示线条的意思 ,使用的顺序html—>head—>单独样式的—>base 里面的样式—–>