1. 1.
다음과 같이 코드 코드를 복사하십시오.
<html>
<헤드>
<script type = "text/javaScript">
// go_rush (wulin.com)에서 //www.vevb.com/
var = {
"바이두": "http://www.baidu.com/",
"Google": "http://www.google.com/",, "
"Microsoft": "http://www.microsoft.com/",
"wulin.com": "// www.vevb.com/"
};
함수 showurl (요소) {// Harbin Object 사용
Alert (Hash [element.value])
}
</스크립트>
</head>
<body>
<양식>
<입력 유형 = "text"id = "txt" />
<입력 유형 = "button"value = "test"onclick = "showurl (document.getElementByid ( 'txt'));"/>
</form>
</body>
</html>
2.
다음과 같이 코드 코드를 복사하십시오.
<cript>
var ht =
{{
"C1": { "userId": "userc1", "username": "usercc1"},
"C2": { "userId": "userc2", "username": "usercc2"},
"C3": { "userId": "userc3", "username": "usercc3"}
};
경고 (ht [c1 "] ["userId "];
경고 (ht [c2 "] ["userId "];
</스크립트>
3
다음과 같이 코드 코드를 복사하십시오.
<cript>
var arr = 새로운 배열
경고 (ARR [0] .S);
경고 (ARR [0] .AA);
경고 (ARR [1] .S1);
경고 (ARR [1] .AA1);
</스크립트>