将链接复制到表单框格式链接 [英] copy link to in put form box whit link
问题描述
我试着跟进。我希望我可以点击一个文本链接然后
然后链接将被复制到输入表格框中(< input type =" text"
name =" img_url" />)。
我已经google-ed关于我如何能做到这一点但我无法找到一个解释如何我
可以做这个。我确定我的javascript技能是问题....
这里有人可以帮助我这个吗?
招呼Wouter
我害怕我不听你的询问。
Danny
Wouteraécrit:
我尝试跟随。我希望我可以点击一个文本链接然后
然后链接将被复制到输入表格框中(< input type =" text"
name =" img_url" />)。
不理解利息
普通的单击链接时调用一个新文件
什么会是这个复制的用途。如果新文件尽快加载
我已经google-ed关于我如何做到这一点但我无法找到一个解释如何我
可以做到这一点。我确定我的javascript技能是问题....
< script type =" text / javascript">
onload = function(){
var A = document.getElementsByTagName(''A'');
for(var i = 0; i< A.length ; i ++)
if(A [i] .href)
A [i] .onclick = function(){copi(this); }
}
函数copi(what){
document.myForm.img_url.value = what.href;
返回false;
}
< / script>
< form name =" myForm">
< input name =" img_url">
< / form>
< a href =" javascript :alert(''hello'')"> hello< / a>
< a href =" page.htm"> page< / a>
< a name =" myAnchor">< / a>
且无链接无法使用
-
Stephane Moriaux et son(moins)vieuxMacdéjàdépassé
Stephane Moriaux和他的(旧)Mac已经过时
< blockquote>
并且没有链接没有更多工作
我现在看到的解决方案是。惠特PHP,因为那是唯一的脚本
langauge我可以编写脚本。那么我可以使用PHP来删除网址吗?所以我不这样
了javascript :alert(''....
我尝试在某处使用if(isset) (
Hi,
I try to make the follow. I want that i can click on a text link and that
then a link wil be copyed in a input form box (<input type="text"
name="img_url" />).
I have google-ed about how i can make this but i cant find a explane how i
can do this. I''m sure my javascript skills are the problem....
Is there here someone who can help me whit this ?
Greets Wouter
I''m afraid I don''t follow your query.
Danny
Wouter a écrit :I try to make the follow. I want that i can click on a text link and that
then a link wil be copyed in a input form box (<input type="text"
name="img_url" />).Do not understand the interest
Ordinary when you click a link a new file is called
What will be the use of this "copy" if the new file is loaded as soon
I have google-ed about how i can make this but i cant find a explane how i
can do this. I''m sure my javascript skills are the problem....<script type="text/javascript">
onload = function() {
var A = document.getElementsByTagName(''A'');
for(var i=0; i<A.length; i++)
if(A[i].href)
A[i].onclick = function() { copi(this); }
}
function copi(what) {
document.myForm.img_url.value = what.href;
return false;
}
</script>
<form name="myForm">
<input name="img_url">
</form>
<a href="javascript:alert(''hello'')">hello</a>
<a href="page.htm">page</a>
<a name="myAnchor"></a>
and no link no more works
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
and no link no more worksThe solution that i see now is. whit PHP because thats the only script
langauge i can script. So can i use PHP to strip the url ? So i dont so
anymore javascript:alert(''....
I try to use somewhere if(isset(
这篇关于将链接复制到表单框格式链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!