336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

안녕하세요.

 

이번에는 간단한 소스 코드 알려드릴꼐요.

 

간단하게 text입력하면 그 값을 바로 밑에 비동기식으로 출력이 될꺼예요.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<html>
<meta charset="utf-8"/>
<!-- angularJS를 불러옵니다. -->
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>
 
<div ng-app="">    <!-- angularJS단위이름(?) -->
 
<p>기본 text:</p>
<!-- ng-model은 값을 name으로 넣어줍니다. -->
<p>Text값 입력 : <input type="text" ng-model="name" placeholder="아무거나 입력해주세요."></p>
<!-- {{변수 명으로 불러옵니다.}} -->
<h1>Hello {{name}}</h1>
 
</div>
 
</body>
</html>
 
cs

 

 

 

이렇게 내용이 똑같이 나오네요.

 

혹시 확인하고 싶으시다면 소스를 복사해서 해보세요.

 

감사합니다.

 

'ANGULARJS' 카테고리의 다른 글

angularJS While문같은 repeat  (0) 2016.06.27
angularJS contoller단을 이용하기  (0) 2016.06.27
angularJS 변수를 출력하는 ng-init  (0) 2016.06.27
angularJS 설치하기  (0) 2016.06.26
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

안녕하세요.

 

angularJS를 Eclipse에서 설치하는 방법을 알려드릴꼐요.

 

우선 JAVA설치 : http://jdkblog.tistory.com/1

Eclipse설치 :

Eclipse에서 apache Tomcat설치 : http://jdkblog.tistory.com/4

 

하시는 것을 권장해드릴꼐요 Eclipse에서의 연동이니까요 ㅎㅎ

 

 

1. 일단 eclipse에서 help - Check for Updates를 눌러주세요.

 

 

2. angularJS를 검색하면 이렇게 나온것을 Install합니다.

 

 

 

 

 

 

3. 다음화면에서 confirm을 눌르고 I accept를 체크후에 Fisish를 눌러주세요.(설치 도증에 어떤 화면이 나오면 OK를 2번쯤 눌르면 Eclipse를 재시작 할꺼예요.

 

다음 포스팅에서 angularJS설치확인을 할꼐요 ㅎㅎ

감사합니다~

 

 

 

 

 

 

 

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.


이방법 혹은 원본파일에서 사용해도됩니다..

var s = document.createElement('script');

s.type = 'text/javascript';

s.async = true;

s.src = '//code.jquery.com/jquery-1.11.3.min.js';

(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(s);


$(document).ready(function(){

JQUERY 구문

});

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

HTML 메일에 간단하게 알려드리겠습니다.

 

<!DOCTYPE html>
<html>
<body>

<p>
This is an email link:
<a href="mailto:someone@example.com?Subject=Hello%20again" target="_top">Send Mail</a>
</p>

<p>
<b>Note:</b> Spaces between words should be replaced by %20 to ensure that the browser will display the text properly.
</p>

</body>
</html>

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

 

 

$.ajax({
   type:'POST',
   data:new FormData($('#formId')[0]),
   cache: false,
   processData: false,
   contentType:false,
   url:"URL주소",
   success:성공함수,
   error:에러함수
  });

 

 

 

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

안녕하세요 이번엔 PHP에서 주소를 가져오는 방법을 알려드릴꼐요.

 

<?

   

    $hostname=$_SERVER["HTTP_HOST"]; //도메인명(호스트)명을 구합니다.
   $uri= $_SERVER['REQUEST_URI']; //uri를 구합니다.
   $query_string=getenv("QUERY_STRING"); // Get값으로 넘어온 값들을 구합니다.
   $phpself=$_SERVER["PHP_SELF"]; //현재 실행되고 있는 페이지의 url을 구합니다.
   $basename=basename($_SERVER["PHP_SELF"]); //현재 실행되고 있는 페이지명만 구합니다.

   echo$hostname."<br>";
   echo$uri."<br>";
   echo$query_string."<br>";
   echo$phpself."<br>";
   echo$basename."<br>";


?>

순차적으로 예를 나타낸다면

www.nver.com

/test.php?con=ddd

con=ddd

/test.php

test.php

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

안녕하세요. 이번엔 JAVASCRIPT에서 background 이미지와 이미지 크기 및 반복 안하는 방법에 대해서 간단하게 알려드리겠습니다..

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<script>
    window.onload = function(){
    //반복제거, url
    document.getElementById("div").style.backgroundRepeat = "no-repeat";
    //이미지 등록
    document.getElementById("div").style.backgroundImage = "url('해당파일위치')";
    //이미지 사이즈
    document.getElementById("div").style.backgroundSize = "200px";
    }
</script>
 
<div id='div'>
 
</div>
cs
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

안녕하세요. 이번엔 JQUERY에서 URL을 가져오는 방법을 알려드리겠습니다.

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
<!-- jquery를 불러옵니다. jquery.com download 페이지를 참조해주세요 -->
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
 
<script>
    window.onload = function(){
        //전체주소
        console.log("url : "+$(location).attr('href'));
 
        //http:, localhost:port번호, index.html ?test=tttt 순으로 나누어져 있습니다.
        console.log("url : "+$(location).attr('protocol')+"//"+$(location).attr('host')+""+$(location).attr('pathname')+""+$(location).attr('search'));
    }
</script>
cs
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

안녕하세요. 이번엔 JAVASCRIPT URL의 Parameter를 처리하는 방법을 알려드리겠습니다.

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function getParams() {
    // 파라미터가 담길 배열
    var param = new Array();
 
    // 현재 페이지의 url
    var url = decodeURIComponent(location.href);
    // url이 encodeURIComponent 로 인코딩 되었을때는 다시 디코딩 해준다.
    url = decodeURIComponent(url);
 
    var params;
    // url에서 '?' 문자 이후의 파라미터 문자열까지 자르기
    params = url.substring( url.indexOf('?')+1, url.length );
    // 파라미터 구분자("&") 로 분리
    params = params.split("&");
 
    // params 배열을 다시 "=" 구분자로 분리하여 param 배열에 key = value 로 담는다.
    var size = params.length;
    var key, value;
    for(var i=0 ; i < size ; i++) {
        key = params[i].split("=")[0];
        value = params[i].split("=")[1];
 
        param[key] = value;
    }
 
    return param;
}
cs

 

 

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

안녕하세요. URL주소를 가져오는 방법을 알려드릴께요

 

1
2
3
4
5
6
7
8
9
<script>
    window.onload = function(){
        //전체주소
        console.log("url : "+location.href);
 
        //http:, localhost:port번호, index.html ?test=tttt 순으로 나누어져 있습니다.
        console.log("url : "+location.protocol+"//"+location.host+""+location.pathname+""+location.search);
    }
</script>
cs

+ Recent posts