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

文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

到目前為止學過了兩種包括其他 JSP 網頁至目前網頁的方式。一個是透過 include 指示元素,它在轉譯時期直接將另一 JSP 網頁合併至目前網頁進行轉譯,例如:

<%@include file="/WEB-INF/jspf/header.jspf"%>

 

另一個方式是透過 <jsp:include> 標籤,可於執行時期依條件,動態決定是否包括另一個網頁,該網頁執行完畢後,再回到目前網頁。在包括另一網頁時還可以帶有參數,例如:

文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

語法:

otherWindow.postMessage(message, targetOrigin, [transfer]);

 

otherWindow

文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

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?

 


文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

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?

 


文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

string title = "STRING";
bool contains = title.IndexOf("string", StringComparison.OrdinalIgnoreCase) >= 0;

參考:Case insensitive 'Contains(string)'

 


文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

用正則表示式取代。
正則表示式:"\s+"
注意反斜線!

文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

變數:
使用CSS变量 - CSS | MDN

排版:

Robert 發表在 痞客邦 留言(0) 人氣()

 

table {
    border-collapse: collapse;
}

table, th, td {
    border: 1px solid black;
}

 

參考:CSS Tables - Collapse Table Borders

文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

連結:Tryit Editor v3.5

 


Robert 發表在 痞客邦 留言(0) 人氣()