使用表单动态更改地址栏中的URL [英] Using a Form to Dynamically Change the URL in the Address Bar

查看:151
本文介绍了使用表单动态更改地址栏中的URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发Volusion网站,并且作为向购物车中添加商品的方法,我希望潜在客户能够输入产品代码以自动将该商品添加到购物车。

I'm developing a Volusion site, and as a method of adding items to the cart, I want potential customers to be able to enter a product code to automatically add that product to the cart.

所以,我需要一个能够完全替换地址栏中的内容的表单:

So, I need a form that will completely replace what's in the address bar with:

http://www.yourvolusionstore.com/ShoppingCart.asp?ProductCode=

然后我需要一个领域,他们在产品代码中放入代码并在最后添加代码...我一直在浏览这个地方的答案,但似乎没有任何工作......

And then I need a field where they put in the product code and the code gets added at the end...I've been browsing for an answer to this everywhere, but nothing seems to work...

推荐答案

<form action="ShoppingCart.asp" name="form" method="get">
    <input type="text" value="" name="ProductCode">
    <input type="submit" value="Add To Cart">
</form>

这篇关于使用表单动态更改地址栏中的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆