<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>浏览按钮 &#8211; LPC影子技术分享</title>
	<atom:link href="https://www.mudbest.com/tag/%e6%b5%8f%e8%a7%88%e6%8c%89%e9%92%ae/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.mudbest.com</link>
	<description>行影不离,忘之却步.</description>
	<lastBuildDate>Mon, 01 Oct 2012 07:09:55 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>html:file中把浏览按钮变成英文</title>
		<link>https://www.mudbest.com/htmlfile%e4%b8%ad%e6%8a%8a%e6%b5%8f%e8%a7%88%e6%8c%89%e9%92%ae%e5%8f%98%e6%88%90%e8%8b%b1%e6%96%87/</link>
		
		<dc:creator><![CDATA[hkshadow]]></dc:creator>
		<pubDate>Thu, 19 Jul 2012 01:14:02 +0000</pubDate>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[按钮]]></category>
		<category><![CDATA[浏览按钮]]></category>
		<guid isPermaLink="false">http://www.mudbest.com/?p=1136</guid>

					<description><![CDATA[1、页面上放个隐藏的 2、然后加上一个文本input（type=&#8221;text&#8221;）和一个按...]]></description>
										<content:encoded><![CDATA[<p>1、页面上放个隐藏的</p>
<pre class="brush: xml; title: ; notranslate">&lt;input type= “file” /&gt;</pre>
<p>2、然后加上一个文本input（type=&#8221;text&#8221;）和一个按钮input（type=&#8221;button&#8221;）</p>
<p>3、点按钮的时候调用</p>
<pre class="brush: xml; title: ; notranslate">&lt;input type=file /&gt;</pre>
<p>的click选择文件<span id="more-1136"></span></p>
<p>4、在</p>
<pre class="brush: xml; title: ; notranslate">&lt;input type=file /&gt;</pre>
<p>的onchange事件中把其值显示在文本input中</p>
<p>5、注意把文本input设置成只读的，防止出错</p>
<p>例1：</p>
<pre class="brush: xml; title: ; notranslate">
&lt;form name=formen&gt;  
&lt;input type=&quot;file&quot; name=&quot;picpath&quot; id=&quot;picpath&quot; style=&quot;display:none&quot; onChange=&quot;document.formen.path.value=this.value&quot;&gt;  
&lt;input name=&quot;path&quot; readonly&gt; 
&lt;input type=&quot;button&quot; value=&quot;Browse&quot; onclick=&quot;document.formen.picpath.click()&quot;&gt; 
&lt;/form&gt;
</pre>
<p>例2：</p>
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
input {
	border: 1px solid green;
}

div {
	width: 300px;
	position: relative;
}

p {
	float: left
}

.file {
	position: absolute;
	top: 20px;
	right: 300px; +
	top: 0; +
	right: 73px;
	width: 0px;
	height: 20px;
	filter: alpha(opacity = 0);
	-moz-opacity: 0;
	opacity: 0;
}

#txt {
	height: 20px;
	margin: 1px
}

#ii {
	width: 70px;
	height: 20px;
	margin-top: 2px;
	border: none;
}
&lt;/style&gt;

&lt;div&gt;
	&lt;form method=&quot;post&quot; action=&quot;&quot; enctype=&quot;multipart/form-data&quot;&gt;
		&lt;p&gt;
			&lt;input type=&quot;text&quot; id=&quot;txt&quot; name=&quot;txt&quot; /&gt;
		&lt;/p&gt;
		&lt;p&gt;
			&lt;input id=&quot;ii&quot; type=&quot;image&quot;
				src=&quot;uploads/200702/05_125319_index_search_02.gif&quot; value=&quot;选择&quot; /&gt;
		&lt;/p&gt;
		&lt;p&gt;
			&lt;input type=&quot;file&quot; onchange=&quot;txt.value=this.value&quot; class=&quot;file&quot; /&gt;
		&lt;/p&gt;
	&lt;/form&gt;
&lt;/div&gt;
</pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
