warezteam.ws
warezteam.ws
լավն էր
<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="30000000" />
<input name="userfile" type="file" />
<input type="submit" name="submit" value="ugarkel" />
</form>
ոնց անեմ որ <input name="userfile" type="file" /> սրա տակը նկար դնեմ
կամ գոնե գույնը փոխեմ
շտապ պետքա օգնեեք
ոչ թե ուզում ոմ դաշտի գույնը փոխեմ այլ հենց browse-ի
submit-ը գույնը փոխումա իսկ browse-ը չէHTML կոդ:<form enctype="multipart/form-data" action="_URL_" method="post"> : <input name="userfile" type="file" style="background-color:#F38DF2;/> <input type="submit" value="Send File" style="background-color:#F38DF2;/> </form>
գրածս փորձեք նուր պատասխանեք
Վերջին խմբագրող՝ AMD: 12.08.2007, 15:38:
Էդ հնարավոր չե առանց <div>-երի ու JavaScript-ի
Էս կոդով արա կստացվի , nkar.gif - ի հասցեն նաի ճիշտ տաս
HTML կոդ:<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- div.tom1 {position: relative;} div.tom2 {position: absolute;top: 0px;left: 0px;z-index: 1;} input.file {position: relative;text-align: right;-moz-opacity:0 ; filter:alpha(opacity: 0);opacity: 0;z-index: 2;cursor:pointer;} --> </style> <script language="javascript"> var rep = (document.createElement && document.getElementsByTagName); function initFileUploads() { if (!rep) return; var fakeFileUpload = document.createElement('div'); fakeFileUpload.className = 'tom2'; fakeFileUpload.appendChild(document.createElement('input')); var image = document.createElement('img'); image.src='nkar.gif'; fakeFileUpload.appendChild(image); var x = document.getElementsByTagName('input'); for (var i=0; i< x.length ; i++) { if (x[i].type != 'file') continue; if (x[i].parentNode.className != 'tom1') continue; x[i].className = 'file hidden'; var clone = fakeFileUpload.cloneNode(true); x[i].parentNode.appendChild(clone); x[i].relatedElement = clone.getElementsByTagName('input')[0]; x[i].onchange = x[i].onmouseout = function () { this.relatedElement.value = this.value; } } } </script> </head> <body> <div class="tom1"> <input type="file" class="file" /> <div class="tom2"> <input /> <img width="100" height="25" src="nkar.gif" /> </div> </div> </body> </html>
Վերջին խմբագրող՝ Tom: 12.08.2007, 17:33:
Կամել խափի բռաուզեռին էս ձև :
HTML կոդ:<input type=file name=browse style="display: none;"> <input type=text name=file> <input type=button style="font-style:veranda; font-size:12px; font-weight:bold; text-transform:lowercase; color:white;background-color:#A2C382; height:22px;border-style:ridge;text-align:center;" onClick="browse.click();file.value=browse.value;" value="Select a File...">
այ ես ուրիշ բան
ավելի շատ դուր եկավ 2-րդ ձևը
Նաի թե որ ձևը որ բռաուզեռում է աշխատում
--|IE4+|---|Opera|--|Mozila|--|Netscape4+|
1---| + |------| + |--------| - |-----------| + |---
2---| + |------| + |--------| - |-----------| - |---
3---| + |------| + |--------| + |-----------| + |---
Էս գրում եմ , որովհետև ամենա թույլն է քո դուրը եկել :
Վերջին խմբագրող՝ Tom: 13.08.2007, 08:57:
Կամել եթե շատ ես հավանել 2-րդը սենց գրի script-ների տեղերը չխառնես , էս դեպքում Mozila-ի ու Netscape-ի վրա կլնի սովորական ձևը , բայց կարևորը կաշխատի:
HTML կոդ:<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script language="javascript"> var browser = navigator.userAgent.toLowerCase(); if((browser.indexOf("firefox") != -1) || (browser.indexOf("netscape") != -1))br='nav'; </script> </head> <body> <span id="place"><input type="file" name="browse" style="display: none;"> <input type="text" name="file" > <input type="button" style="font-style:veranda; font-size:12px; font-weight:bold; text-transform:lowercase; color:white;background-color:#A2C382; height:22px;border-style:ridge;text-align:center;" onClick="browse.click();file.value=browse.value;" value="Select a File..."></span> </body> </html> <script language="javascript"> if(br=='nav')document.getElementById("place").innerHTML='<input type="file" name="browse">'; </script>
<input type=file name=browse style="display: none;">
<input type=text name=file>
<input type=button
style="font-style:veranda; font-size:12px; font-weight:bold;
text-transform:lowercase;
color:white;background-color:#A2C382;
height:22px;border-style:ridge;text-align:center;"
onClick="browse.click();file.value=browse.value;"
value="Select a File...">
ես ձևով ֆայլը չի ուղարկում չեմ հասկանում ինչի
մի հատ նոր տվածտ ձևով կփորձեմ կասեմ ինչ եղավ
ՕՏ. հայեր ջան, մի բան խնդրեմ.
էս կոդերը որ դնում եք, հատկապես օրինակելիները, աշխատեք մաքսիմալ ստանդարտներին համապատասխան գրել: Չակերտները, փոքրատառերը...
Այս պահին թեմայում են 1 հոգի. (0 անդամ և 1 հյուր)
Էջանիշներ