Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/426.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android-在web视图中设置文本/javascript_Javascript_Android_Webview - Fatal编程技术网

Android-在web视图中设置文本/javascript

Android-在web视图中设置文本/javascript,javascript,android,webview,Javascript,Android,Webview,我想在web视图中显示以下脚本: <div id="hello_43211234" class="ym"></div> <script type="text/javascript">(function(e,t){if(t._ym===void 0){t._ym="";var m=e.createElement("script"); m.type="text/javascript",m.async=!0,m.src="//static.yieldmo.com/y

我想在web视图中显示以下脚本:

<div id="hello_43211234" class="ym"></div>
<script type="text/javascript">(function(e,t){if(t._ym===void 0){t._ym="";var m=e.createElement("script");
m.type="text/javascript",m.async=!0,m.src="//static.yieldmo.com/ym.min.js",(e.getElementsByTagName("head")[0]||e.getElementsByTagName("body")[0]).appendChild(m)}else t._ym instanceof String||void 0===t._ym.chkPls||t._ym.chkPls()})(document,window);
</script>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

        <WebView  
        android:id="@+id/webview_footer"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
    />
</LinearLayout>
web视图的布局:

<div id="hello_43211234" class="ym"></div>
<script type="text/javascript">(function(e,t){if(t._ym===void 0){t._ym="";var m=e.createElement("script");
m.type="text/javascript",m.async=!0,m.src="//static.yieldmo.com/ym.min.js",(e.getElementsByTagName("head")[0]||e.getElementsByTagName("body")[0]).appendChild(m)}else t._ym instanceof String||void 0===t._ym.chkPls||t._ym.chkPls()})(document,window);
</script>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

        <WebView  
        android:id="@+id/webview_footer"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
    />
</LinearLayout>


您能详细说明您的问题是什么吗?或者你一开始想做什么?在我看来,javascript所做的唯一一件事就是向页面添加另一个javascript。Webview不会显示。我无法在web视图中看到脚本。您希望显示什么?你写javascript了吗?你想做什么?这是需要显示的脚本。。(函数(e,t){if(t.。(u ym===void 0){t.(u ym=“”;var m=e.createElement(“脚本”);m.type=“text/javascript”,m.async=!0,m.src=“//static.yieldmo.com/ym.min.js”,(e.getElementsByTagName(“head”)[0]| e.getElementsByTagName(“body”)[0]).appendChild(m)}否则t.t.|ym instanceof String();void==cht=| kpu chymls.cht}文档窗口);是的,您已经发布了脚本,但是您希望发生什么?你想用这个脚本实现什么?是你自己写的吗?