<script language="javascript">
function redirectlo()
{
window.location.href='/dd/ss.show?nowpage='+document.all("aa").value;
}
</script>
<input type="text" name="aa"><input type="button" name="bb" value="ok" onclick="redirectlo();">
function redirectlo()
{
window.location.href='/dd/ss.show?nowpage='+document.all("aa").value;
}
</script>
<input type="text" name="aa"><input type="button" name="bb" value="ok" onclick="redirectlo();">
<input type="button" name="bb" value="ok" onclick="window.location.href='/dd/ss.show?nowpage='+document.all.aa.value">
里的時候可能出現取不到的情況 , document.all.aa.value
document.all("aa").value
一般可以取到 最好還是用id <script language="javascript">
//這個方法可以取到"當前"窗口里的 id 為 "idaa" 的物件 ,
var oText = window.document.getElementById("idaa");//oText.value 就是他的值
</script>
<input type="button" value="ok" onclick="a()">
<script language="javascript">
function a(){
var oText = document.all("aa")
window.location.href="http://"+oText.value;}
</script>