这是我正在使用的HTML
<?xml version="1.0" encoding="utf-8"?>
<manifest package="sharukh.locky"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAGufoN9huWkmw8nTskk2aaFHW1gXn1Z7Q"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<!-- Activities -->
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".Tutorial"/>
<activity android:name=".TutorialSelectApp"/>
<activity
android:name=".LockScreen"
android:label="@string/title_activity_lock_screen"
android:theme="@style/AppTheme.NoActionBar"/>
<!-- Services -->
<service
android:name=".LockyService"
android:enabled="true"
android:exported="true"/>
<receiver
android:name=".BroadCastReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.SCREEN_OFF"/>
<action android:name="android.intent.action.HEADSET_PLUG"/>
</intent-filter>
</receiver>
</application>
</manifest>
现在我编写了一个名为bindEvents的方法,它将执行以下操作
<div class="col-md-12 col-sm-12 text-center permissions-submit">
<button class="btn btn-primary ">Set Permissions</button>
</div>
//remove extra ending div
问题是按钮点击没有任何反应。它应该调用方法&#34; permissionsSubmit&#34;。
答案 0 :(得分:1)
为什么不按照jQuery API中提到的那样尝试这个。
$( "#foo" ).bind( "click", function() {
//Do your work here
});