2014年3月18日 星期二

javascript-jsp javascript-asp jquery-jsp jquery-asp

javascript-jsp
javascript-asp
jquery-jsp
jquery-asp


$.getJSON('getDate?callback=?',
function(data) {
if (data[0]){
for (r=0 ; r<data.length; r++)
{
//alert(data[0][0]);
//obj_field.options[r+1] = new Option(data[r][0],data[r][1]);
}
}
}
)







There are multiple possibilities in invoking a JSP page from JavaScript.

1) Opening the JSP page in a separate popup window using JavaScript function - window.open()
window.open("MyPage.jsp?param1=value1&param2=value2","pageName","height=400,width=400");
2) Redirecting to the JSP page when the form is submitted.
document.forms[0].action = "MyPage.jsp";
document.forms[0].method = "post"; // "get"
document.forms[0].submit();
3) Clicking on a hyperlink which will redirect to another page.
<a href="MyPage.jsp?param1=value1&param2=value2">My Page</a>

沒有留言:

張貼留言