<form action="#/iframe?title=Search&url=http://encore.scranton.edu/iii/encore/search/" id="form" method="get" name="form" >
<input name="target" type="search" value="" placeholder="Search" class="search-input">
</form>
Angular 代码:
iframe/templates/index.html
<div ui-view class="container">
....
<div class="animated fadeIn iframe">
<iframe src="{{ url }}" frameborder="0"></iframe>
</div>
</div>
iframe/controller.js
//
// Routes
//
.state('iframe', {
url : '/iframe?title&url',
templateUrl : 'modules/Iframe/templates/index.html',
controller : 'IframeController'
})
}]);
最佳答案
如果没有看到 JS,我可能会在黑暗中跳舞,但是你尝试过这样的事情吗?
假设没有框架
var myform = document.getElementById("form");
var action = myform.getAttribute("action");
//reset the entire attribute
myform.setAttribute(action+"value_i_want_appended");
关于javascript - HTML 表单操作是前置值而不是附加值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28331016/