小编use*_*ser的帖子

如何在手机空白中使用iscroll javascript?

我已经尝试为我的应用程序实现iscroll java脚本作为CSS 位置的补救过程:修复了在使用cordova 2.1.0的 android 2和3版本中不起作用

我从这里复制了iscroll-lite的javascript

HTML代码

<div id="wrapper" class="wrapper">
<div id="wrapper-container" class="wrapper-container">
    <div id="header" class="header">
    <div id="header_title" class="header_title"> </div>
    <div id="abc" class="abc"><img src="img/abc.png""/>                     </div>
</div>
<div id="images" class="images"><img  name="slide" src="img/abc.png" width=100%; />
</div>
<div id="description"  class="description">
<div id="title" class="title">
    <h1><strong></strong></h1>
</div>
<div id="desc" class="desc">
</div>
</div>  

<div id="footer" style="background-image:url(img/bar.png);" class="footer">
<div id="footer_text" class="footer_text">footer_text</div>
<div id="image" class="image noSelect"><img src="img/info.png" onclick="info()"/></div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)

desc标签的内容将溢出

CSS

.wrapper
{
    position: absolute; width:auto; margin:0 auto; height:100%; overflow: …
Run Code Online (Sandbox Code Playgroud)

html javascript iscroll cordova cordova-2.0.0

14
推荐指数
2
解决办法
1万
查看次数

如何在phonegap中创建插件以在后台运行应用程序?

我已经在phonegap中创建了后台服务插件(在后台运行应用程序).

这是我的插件的java代码:

public class BackgroundService extends Plugin {
    @Override
    public PluginResult execute(String action, JSONArray args, String callbackId)
    {
        PluginResult.Status status = PluginResult.Status.OK;
        String result = "";

        try {
            if (action.equals("onCreate")) {
                this.onCreate();
            }
            else if (action.equals("onBind")) {
                Intent intent = null;
                this.onBind(intent);
            }
            else if (action.equals("onDestroy")) {
                this.onDestroy();
            }
            else if (action.equals("onStart")) {
                Intent intent = null;
                this.onStart(intent,args.getInt(1));
            }
            else if (action.equals("onUnbind")) {
                Intent intent = null;
                this.onUnbind(intent);
            }
            return new PluginResult(status, result);
        } catch(JSONException e) {
            return new PluginResult(PluginResult.Status.JSON_EXCEPTION); …
Run Code Online (Sandbox Code Playgroud)

plugins android cordova

8
推荐指数
1
解决办法
2万
查看次数

如何在PhoneGap/Android中实现DATE PICKER?

我试图在android中实现日期选择器.我希望它能够获取数据并以文本格式显示

  <html>
  <head>
    <script type="text/javascript" charset="utf-8" src="cordova-2.5.0.js"></script>
    <script type="text/javascript" charset="utf-8" src="datePickerPlugin.js"></script>
  <script type="text/javascript" charset="utf-8">

  function dateTest() {
      var myNewDate = new Date();

      window.plugins.datePicker.show({
          date : myNewDate,
          mode : 'date', // date or time or blank for both
          allowOldDates : true
      }, function(returnDate) {
        var newDate = new Date(returnDate);
            currentField.val(newDate.toString("dd/MMM/yyyy"));

            // This fixes the problem you mention at the bottom of this script with it not working a second/third time around, because it is in focus.
            currentField.blur();
      });
  }
</script>
</head> …
Run Code Online (Sandbox Code Playgroud)

javascript jquery android datepicker cordova

3
推荐指数
1
解决办法
3万
查看次数

如何将给定的jquery编码为javascript?

我是phonegap的新手.所以,第一次使用JAVASCRIPT.我在javascript工作.我很乐意使用Java Script.我正在为Phone Gap中的短信实现一个插件.

在教程中,他们要求使用以下代码.

window.plugins.sms.send($('#phone').val(), 
$('#message').val(), 
function () { 
   alert('Message sent successfully');  
},
function (e) {
    alert('Message Failed:' + e);
}
);
Run Code Online (Sandbox Code Playgroud)

有人可以帮我解码jquery代码吗?

请帮帮我.

javascript jquery cordova

-7
推荐指数
1
解决办法
70
查看次数