小编use*_*468的帖子

将数据加载到输入文本表单中

我使用此代码将数据加载到我的textarea:

jQuery('.content_container').load('http://www.evedalsvardshus.se/plugins/calendar/edit_dates.php', {'value': datum} );
Run Code Online (Sandbox Code Playgroud)

但是当我尝试使用以下代码将数据加载到输入文本表单时:

jQuery('.header').load('http://www.evedalsvardshus.se/plugins/calendar/get_header.php');
Run Code Online (Sandbox Code Playgroud)

什么都没发生.get_header.php只包含"asdsd".

谁能帮我?

jquery

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

将数据直接加载到selectbox angularjs中

我有一个订阅的客户.您还可以编辑客户订阅.

当您要编辑订阅时,您可以在不同的选择框中选择不同的选项.当您在第一个选择框中选择一个选项时,其他选择框将填充"属于"您在第一个选择框中选择的选项的数据.

这是我的第一个选择框的html代码:

<select class="form-control input-sm2" ng-model="selectedSupercustomer" ng-options="item as item.namn for item in superkundOptions" ng-change="onChangeSuperCustomer(selectedSupercustomer)">
Run Code Online (Sandbox Code Playgroud)

这是我的angularjs代码,用数据填充选择框:

$http.get($rootScope.appUrl + '/nao/abb/getSuperkundData/' + $rootScope.abbForm).success(function(data) {
    $scope.superkundOptions = data;
});
Run Code Online (Sandbox Code Playgroud)

我只是从我的后端获取数据.

以下是我的其他选择框:

<select class="form-control input-sm2" ng-disabled="!selectedSupercustomer" ng-model="selectedGateway" ng-options="item as item.gwtypen for item in gatewayOptions" ng-change="onChangeGateway(selectedGateway)"><option value=''>Välj GW</option></select>

<select class="form-control input-sm2" ng-disabled="!selectedSupercustomer" ng-model="selectedSwitch" ng-options="item as item.gatuadresser for item in switchOptions" ng-change="onChangeSwitch(selectedSwitch)"><option value=''>Välj switch</option></select>
Run Code Online (Sandbox Code Playgroud)

我使用以下代码更改选择框中的选项:

$scope.onChangeSuperCustomer = function(selectedSupercustomer) {

    $http.get($rootScope.appUrl + '/nao/abb/getGatewayData/' + selectedSupercustomer.nod_id).success(function(data) {
        $scope.gatewayOptions = data;
    });

    $http.get($rootScope.appUrl + '/nao/abb/getSwitchData/' + selectedSupercustomer.superkund_id).success(function(data) {
        $scope.switchOptions …
Run Code Online (Sandbox Code Playgroud)

javascript angularjs

6
推荐指数
1
解决办法
501
查看次数

ajax调用后用PHP重定向

我正在做以下ajax调用:

$('#save_sale').click(function() {
    var save_sale = 1;
    $.ajax({
        type: 'GET',
        url: 'summary.php',
        data: {save_sale: save_sale},
        success: function(data) { /* Do something here?? */ },
        error: function(xhr, ajaxOptions, thrownerror) { }
    });
});
Run Code Online (Sandbox Code Playgroud)

这是我的PHP:

function createSale()
    {

        if($sale_id = $this->link->inQuery("INSERT INTO nya_forsaljningar(personnr, status, datum) VALUES('".$this->personnr."','".$this->status."','".$this->sale_date."')"))
        {
            $this->link->inQuery("UPDATE services_temp SET active=1 WHERE temppdtls='".$this->personnr."'");
            $this->link->inQuery("UPDATE summary_temp SET active=1 WHERE personnr='".$this->personnr."'");

            header("Location: addcust.php?new_sale=$sale_id");
            exit;
        }
        else
        {
            return false;   //Kunde inte skapa försäljningen
        }
    }

if(isset($_GET['save_sale']))
{
    $sale_date = date('Y-m-d');         //Datumet då man skapar …
Run Code Online (Sandbox Code Playgroud)

php ajax jquery redirect

5
推荐指数
2
解决办法
4万
查看次数

语法错误,无法识别的表达式:unsupported pseudo

我试图执行下面的代码,但它会抛出以下错误消息:

错误:语法错误,无法识别的表达式:unsupported pseudo:really-good-at

代码:

<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
    /* Implement a Cesar crypto decrypt for the code.
    * [Code ASCII] + n => Decrypted ASCII.
    * where n = char pos in cryptedCode string (R=1) */

if ($('.js.php.mysql.html.oop').is(':really-good-at')) {
    var cryptedCode = 'RFLLDN';
    var decryptedCode = '';
    console.log('Enter this code in the form: ' + decryptedCode);
    //Open website url
    var url = 'aHR0cDovL2JpdC5seS8xN21NRzk4';
    window.open(window.atob(url));
}
</script>
<input type="text" class="js.php.mysql.html.oop">
Run Code Online (Sandbox Code Playgroud)

有谁可以解释为什么会抛出这个错误?

syntax jquery selector

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

将值推送到数组AngularJS

我试图用.push();将数据值推送到AngularJS中的数组,但我总是收到此错误消息:

Error: $scope.test.push is not a function
Run Code Online (Sandbox Code Playgroud)

这是我的HTML:

<div ng-controller="Test">
<div class="container">
<div class="col-sm-9 col-sm-offset-2">

    <div class="page-header"><h1>Testar</h1></div>
    <table class="table table-striped table-condensed">
    <thead>
        <tr>
            <th>Sträcka</th>
            <th>Tid</th>
         </tr>
    </thead>
        <tr ng-repeat="info in test"><td>{{info.stracka}}</td><td>{{info.tid}}</td></tr>
    </table>

    <form name="userForm" ng-submit="submitForm(userForm.$valid)" novalidate> <!-- novalidate prevents HTML5 validation since we will be validating ourselves -->
        <div class="form-group" ng-class="{'has-error' : userForm.stracka.$invalid && !userForm.stracka.$pristine, 'has-success' : userForm.stracka.$valid }">
            <label>Sträcka(m):</label>
            <input type="text" name="stracka" class="form-control" ng-model="form.stracka" required>
            <p ng-show="userForm.stracka.$invalid && !userForm.stracka.$pristine" class="help-block">Fel sträcka</p>
        </div>

        <div class="form-group" ng-class="{'has-error' : userForm.tid.$invalid && !userForm.tid.$pristine, …
Run Code Online (Sandbox Code Playgroud)

javascript syntax-error angularjs

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

C中的E表示法

我正在阅读C编程 - 一种现代的方法,我偶然发现了关于电子符号的部分.我很难理解它们.

请使用以下代码:

printf("%12.5e", 30.253);
Run Code Online (Sandbox Code Playgroud)

这导致以下输出:

3.02530e+01
Run Code Online (Sandbox Code Playgroud)

谁能解释一下这是如何工作的?数字12在这里表示什么?

c scientific-notation

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

Xcode 6.0中的非法配置

我试图在Xcode中构建我的项目,但是我收到错误消息:"非法配置启动屏幕可能没有连接".

我试图从"启动屏幕文件"字段中删除该值,但我得到了同样的错误.我也试图做一个干净的构建没有成功.

谁可以帮助我?

苹果电脑

macos xcode objective-c

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