【问题标题】:HTML + Javascript Database Small WebsiteHTML + Javascript 数据库小型网站
【发布时间】:2011-07-23 21:47:44
【问题描述】:

我正在尝试创建一个 Adob​​e Air 应用程序,或者使用新的 Adob​​e Dreamweaver 5.5 移动应用程序制作基本的移动应用程序,它可以连接到我的在线服务器以获取内容。 我从未使用 HTML + Javascript 来创建数据库“产品”来显示。

IE:通讯录。

[[ Show list of contacts ]]
<a href="details.php?contactId=123">John Doe</a>  <<-- This would then take you to the contact details

但是使用 HTML + JS,您无法真正复制该过程。

我目前有这个设置来从服务器中提取数据。

<script type="text/javascript">
$(document).ready(function(e) {   
    $.ajax({
        url: 'http://www.domain.ca/classes/brain.php?a=select',
        crossDomain: true,
        type: 'GET',
        dataType: 'json',           
        success: function(data, textStatus, jqXHR) {

            $("#taskList").empty();
            $("#tasksTemplate").tmpl(data).appendTo("#taskList");

        },

        error: function(responseText) {
            alert('Error: '+ responseText.toString());  
        }
    });
});
</script>

所以这将在页面上显示我的内容... 但是如何将 2 个页面链接在一起...例如在地址簿中?

<a href="details.html">John Doe</a>

任何帮助将不胜感激......

【问题讨论】:

    标签: javascript jquery html air adobe


    【解决方案1】:
    <a href="#" class="myLink">John Doe</a>
    

    $('.myLink').live('click', function() {
        // ajax stuff
    });
    

    【讨论】:

      猜你喜欢
      • 2017-07-24
      • 1970-01-01
      • 1970-01-01
      • 2015-11-24
      • 1970-01-01
      • 2011-06-24
      • 1970-01-01
      • 2016-02-27
      • 2016-05-03
      相关资源
      最近更新 更多