English 中文(简体)
网上通话可打上我打字片的资产。
原标题:WebView can t access my jquery scripts in assets

I m 测试 j。 移动文字,能够使用WebView操作超文本5的内容。

似乎可以找到我的杂乱档案,但会因此将其置于以下道路:

Project > Property > www > jquery

where my html file is located:

Project > Property > www >index.html

我的html认为:

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="file:///android_asset/www/jquery/jquery.mobile-1.0.min.css" />
<script src="file:///android_asset/www/jquery/jquery-1.6.4.min.js"></script>
<script src="file:///android_asset/www/jquery/jquery.mobile-1.0.min.js"></script>

<style type="text/css">
#floatMe
{
    float: right;
}
</style>
<script type="text/javascript">
    $(document).ready(function() {
        $( #btnHello ).click(function() {
            var name = $( #txtName ).val();
            alert(name);
        });
    });
</script>
</head>
<body>
<div id="floatMe">
What s your name?
<input id="txtName" value="" />
<button id="btnHello">say hello</button>
</div>
</body>
</html>

这一错误促使我:

ReferenceError: Can t find variable: jQuery at file:///android_asset/www/index.html ReferenceError: Can t find variable: $ at file:///android_asset/www/index.html

问题回答

您是否尝试过一条与你的超文本相近的道路?

<script src="jquery/jquery-1.6.4.min.js"></script>

这说明你如何从电话项目的一个网页上查阅文字,该笔文字也应当相似,因为它在网上浏览。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签