本文介绍了将字符串添加到提交的URL的末尾?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个简单的工作工具,用户可以将一些数据添加到允许他们远程访问设备的表单域中,但我需要它将它们带到登录页面。

 < input type =textname =prog_siteid =prog_sitevalue =http:///> 
< a href =http://onclick =this.href = document.getElementById('prog_site')。valuetarget =_ blank> Let's go!< / a>

上面的代码将它们带到了上述设备中,但我在添加脚本时遇到了问题,在提交的信息(这是一个IP地址)后的以下内容:

/web/guest/en/websys/webArch/authForm.cgi



我一直在寻找方法,但需要尽可能简单?



以下是完整的脚本:

 < script> 
函数open_win()
{
window.open();
}
< / script>

< style>
body {
background-color:#fff;
}
< / style>

< p>< img src =logo.gif/>< / p>

您好客户< / p>

< p>欢迎使用激活< / p>

< p>< a target =_ newhref =>说明< / a>< / p>


< input type =textname =prog_siteid =prog_sitevalue =http:///>
< a href =http://onclick =this.href = document.getElementById('prog_site')。valuetarget =_ blank> Let's go!< / a>


解决方案

可能我误解了这个问题,

 < a href =http://
onclick =this.href =( document.getElementById('prog_site')。value +
'/web/guest/en/websys/webArch/authForm.cgi')
target =_ blank>让我们开始吧!< /一个>


I am putting together a simple tool for work where a user can add in some data to a form field which allows them to remotely access a device, but I need it to take them to the the login page.

<input type="text" name="prog_site" id="prog_site" value="http://" />
<a href="http://" onclick="this.href=document.getElementById('prog_site').value" target="_blank">Let's go!</a>

the above takes them to the said device, but I am having problems with adding a script that then adds on the following after the submitted info (which is an IP address)

/web/guest/en/websys/webArch/authForm.cgi

I have been looking at ways but need it to be as simple as possible?

Here is the full script:

    <script>
function open_win()
{
window.open("");
}
</script>

<style>
body {
background-color: #fff;
}
</style>

<p><img src="logo.gif" /></p>

<p>Hello customer</p>

<p>Welcome to the Activation</p>

<p><a target="_new" href="">Instructions</a></p>


<input type="text" name="prog_site" id="prog_site" value="http://" />
<a href="http://" onclick="this.href=document.getElementById('prog_site').value" target="_blank">Let's go!</a>
解决方案

Possibly I'm misreading the question, but what is wrong with:

<a href="http://"
    onclick="this.href=(document.getElementById('prog_site').value +
                       '/web/guest/en/websys/webArch/authForm.cgi')"
    target="_blank">Let's go!</a>

?

这篇关于将字符串添加到提交的URL的末尾?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 09:35