Javascript 如何在react native webview中设置textarea焦点

Javascript 如何在react native webview中设置textarea焦点,javascript,html,react-native,Javascript,Html,React Native,我想在react native webview中设置textarea autoFoucs,但它不起作用?有人知道怎么解决吗?请与我联系,谢谢 <WebView ref={ref => this.webView = ref} automaticallyAdjustContentInsets={false} style={{ width: this.mScreenWidth, flex: 1, backgroundColor: '#fff', marginTop: this._getSi

我想在react native webview中设置textarea autoFoucs,但它不起作用?有人知道怎么解决吗?请与我联系,谢谢

<WebView
ref={ref => this.webView = ref}
automaticallyAdjustContentInsets={false}
style={{ width: this.mScreenWidth, flex: 1, backgroundColor: '#fff', marginTop: this._getSize(5), paddingHorizontal: this._getSize(16), paddingTop: this._getSize(5) }}
source={{ uri: 'http://localhost:8081/richEditor/richEditor.html' }}
javaScriptEnabled={true}
dataDetectorTypes='none'
startInLoadingState={true}
scrollEnabled={true} />

<textarea id="textarea" autofocus="autofocus"></textarea> <script type="text/javascript" charset="utf-8"> document.getElementById("textarea").focus(); </script>

对输入元素使用自动对焦

   <input autoFocus />

1.人们不应该联系你——这是一个论坛,它的工作方式是问题应该公开解决,这样其他人也会从中受益。2.您应该发布您的代码-您尝试过哪些不起作用的代码?首先,感谢您的建议。我再次编辑了问题,请再次检查,谢谢。