Add parameter to URL
This example uses a javascript to append a value entered into a text box to a URL request. The URL is passed in the form of a query string parameter and is launched from an Anchor tag. http://www.truegeeks.com/asp/mam/osdoc/osframe.asp
AI
AI 摘要: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
源代码
<HTML>
<HEAD></HEAD>
<SCRIPT Language="JavaScript">
<!--
function Validator(lURL) {
var oform = document.form1
var qsparm = oform.TB1.value
if (qsparm == "") {
alert("You must provide a value")
oform.TB1.focus()
return false }
document.location.href = lURL + "?" + escape(qsparm)
return false
}
//-->
</SCRIPT>
<BODY>
<FORM NAME="form1">
<STRONG>
QueryString Parameter:
<INPUT TYPE="TEXT" NAME="TB1">
</STRONG>
<BR><BR>
<A HREF="" onClick="return Validator('YourURL.asp')">Click me to continue </A>
</FORM>
</BODY>
</HTML>
Upload
原始评论 (3)
从 Wayback Machine 恢复