ÆÄÀÏã±â ¹öÆ° À̹ÌÁö·Î º¯°æÇϱâ |
|
|
 |
17³â Àü |
html ÆÄÀÏ
<style>
.file { behavior: url(./imgBtn.htc); }
</style>
<input type="file" name="upfile" class="file" btnsrc="À̹ÌÁö°æ·Î" align="absmiddle" style="cursor:hand;width:0pt;display:none;">
htc ÆÄÀÏ
<PROPERTY NAME="btnsrc" />
<EVENT NAME="onerror" ID="error" />
<ATTACH EVENT="oncontentready" HANDLER="init" />
<ATTACH EVENT="onpropertychange" HANDLER="doPropChange" />
<script>
function init() {
if (type != 'file') return;
textbox = document.createElement("INPUT");
img = document.createElement("IMG");
textbox.type = "text";
textbox.size = size;
textbox.style.cssText = style.cssText;
img.src = btnsrc;
img.align = "absMiddle";
img.attachEvent("onmousemove",onMouseMove);
img.attachEvent("onmouseover", onMouseCursor);
with (style) {
cssText = '';
position = "absolute";
top = 0;
left = 0;
width = 6;
height = 6;
overflow = "hidden";
filter = "alpha(opacity=0)";
clip = "rect(5, 9, 9, 5)";
}
insertAdjacentElement("afterEnd",img);
insertAdjacentElement("afterEnd",textbox);
}
function doPropChange() {
if (window.event.propertyName == "value") textbox.value = value;
}
function onMouseMove() {
style.top = window.event.y + window.document.body.scrollTop - 7;
style.left = window.event.x + window.document.body.scrollLeft - 8;
}
function onMouseCursor() {
style.cursor = 'hand';
}
</script>
|
|
̵̧ : 342 |
̵̧
¸ñ·Ï
|
|