开发者

get values from query string for input box and drop down menu

Hi I have the following page with a query string: http://userpages.umbc.edu/~andrade1/querystring/querystring/example1%20-%20Copy.html

when I click show and go to the receiving page which is here: http://userpages.umbc.edu/~andrade1/querys开发者_开发技巧tring/querystring/example123.html?name=Duck%2C%20Donald&spouse=Daisy

How can I retrieve the query string so that the drop down menu will display the name which is donald duck or mickey depending which button was clicked and the input box will display either minnie or daisy depending which button was clicked?

For example when the show button for mickey mouse is clicked I want mickey mouse to display in the drop down menu but still be able to select other options after the page is loaded and I would like minnie to display in the input box but be able to also type in another value.

Currently the javascript that I am using is:

<script type="text/javascript">
        <!--
        document.write("Name: " + Request.QueryString("spouse"));

        // -->
    </script>

which does not work for a drop down menu or input box


use location.search

JavaScript query string

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜