Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
375 views
in Technique[技术] by (71.8m points)

HTML Form Directing to URL with a Question Mark (?)

I'm attempting to redirect users to a URL that includes a question mark. The issue is on click users are directed to the URL leading up to the '?'. So if my designated URL is www.abc.com/help?blahblah users will be directed to www.abc.com/help.

The problem is I don't know whether or not there will be a '?' in the URL, so I cannot have a blanket case..

My form is as follows

<form action="<%=reviewLink%>">
    <div class="btn-group" role="group">
        <button type="submit" class="btn btn-success small-button">
            <i class="fab fa-review"></i>
        </button>
        <button type="submit" class="btn btn-outline-success large-button"> Review
        </button>
    </div>
</form>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I ended up solving it on my own. I went ahead and added the following to the button elements.

<a href="<%=reviewLink%>" target="_blank" rel="noreferrer noopener">

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.7k users

...