在WP8.1上的WebView中禁用文本选择
我有一个WebView,它加载一个带有PrivacyPolicy的HTML文件,但我不希望用户能够选择和复制文本。如何做到这一点 这是我的密码:在WP8.1上的WebView中禁用文本选择,webview,windows-phone-8.1,Webview,Windows Phone 8.1,我有一个WebView,它加载一个带有PrivacyPolicy的HTML文件,但我不希望用户能够选择和复制文本。如何做到这一点 这是我的密码: <WebView x:Name="LicenseWebview" Grid.Row="2" Source="ms-appx-web:///Assets/License/en.html" /> 这可以通过使用JavaScript或CSS来实现。以下是解决这个问题的答案。希望这有帮助 <html onselect
<WebView x:Name="LicenseWebview"
Grid.Row="2"
Source="ms-appx-web:///Assets/License/en.html"
/>
这可以通过使用JavaScript或CSS来实现。以下是解决这个问题的答案。希望这有帮助
<html onselectstart="return false;" style="-ms-user-select: none;">
...
</html>
...