<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--
function ControlTypeChange()
{
alert("시작해봅시다");
var conObject = document.getElementById("txtChange");
alert(conObject.getAttribute("TYPE"));
conObject.setAttribute("TYPE", "password");
alert(conObject.getAttribute("TYPE"));
}
function CreateAttribute()
{
var conObject = document.forms[0].txtChange;
conObject.setAttribute("onclick", clickText);
}
function clickText()
{
alert("으하하하");
}
function ChangeControll()
{
var varStyle = document.forms[0].txtDefault.style["display"];
if(varStyle == "none")
{
document.forms[0].txtDefault.style["display"] = "";
document.forms[0].txtPwd.style["display"] = "none";
}
else
{
document.forms[0].txtDefault.style["display"] = "none";
document.forms[0].txtPwd.style["display"] = "";
}
}
//-->
</SCRIPT>
</HEAD>

<BODY>
<form id="form1">
<INPUT type="text" NAME="txtChange" value=""><INPUT TYPE="button" value="바꾸자" onclick="CreateAttribute();">
<br><br><br><br><br><br>
<INPUT type="text" NAME="txtDefault" value="" style="display: visibility">
<INPUT type="password" NAME="txtPwd" value="" style="display: none">
<INPUT TYPE="button" value="바꾸자" onclick="ChangeControll();">
</form>
</BODY>
</HTML>

Posted by 퓨전마법사
,