For example, if the name of your form is ‘myform’, the JavaScript code for the submit call is:
document.forms["myform"].submit();
But, how to identify a form? Give an id attribute in the form tag
For example, if the name of your form is ‘myform’, the JavaScript code for the submit call is:
document.forms["myform"].submit();
But, how to identify a form? Give an id attribute in the form tag
到目前為止學過了兩種包括其他 JSP 網頁至目前網頁的方式。一個是透過 include
指示元素,它在轉譯時期直接將另一 JSP 網頁合併至目前網頁進行轉譯,例如:
<%@include file="/WEB-INF/jspf/header.jspf"%>
另一個方式是透過 <jsp:include>
標籤,可於執行時期依條件,動態決定是否包括另一個網頁,該網頁執行完畢後,再回到目前網頁。在包括另一網頁時還可以帶有參數,例如:
webBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser1_DocumentCompleted);
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { //This line is so you only do the event once if (e.Url != webBrowser1.Url) return; //do you actual code }
參考:How to make WebBrowser wait till it loads fully?
Uri uriResult; bool result = Uri.TryCreate(uriName, UriKind.Absolute, out uriResult) && (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps);
參考:How to check whether a string is a valid HTTP URL?
string title = "STRING"; bool contains = title.IndexOf("string", StringComparison.OrdinalIgnoreCase) >= 0;
參考:Case insensitive 'Contains(string)'
用正則表示式取代。
正則表示式:"\s+"
注意反斜線!
table { border-collapse: collapse; } table, th, td { border: 1px solid black; }