獲取一個選定的字串 (教程)
要獲取一個選定的字串,用 Text 屬性。
下面的例子演示了如何獲得并顯示一個被選取的字串。[JavaScript]
str = document.selection.Text;
alert( str );
[VBScript]
str = document.selection.Text
alert str
要獲取一個選定的字串,用 Text 屬性。
下面的例子演示了如何獲得并顯示一個被選取的字串。[JavaScript]
str = document.selection.Text;
alert( str );
[VBScript]
str = document.selection.Text
alert str