Howto get javascript value in HTML form
I've got jquery using the sortable plug in.
I'm using the following function to get the values.
$(function() {
$( "#sortable" ).sortable(开发者_Go百科{
placeholder: "ui-state-highlight"
});
});
function overzicht(){
var regel = '';
$('ul#sortable li').each(function(index) {
regel += $(this).attr('id').replace(/ /g, "") + ',';
});
}
<ul id="sortable">
<xsl:for-each select="//regels/item">
<li style="list-style:none; vertical-align:middle; min-height:50px" id="{veld[3]}" class="ui-state-default">
</li>
</xsl:for-each>
</ul>
How do I get the "regel" value in a HTML form like this?
<form name="cartForm" method="post" action="edit_bestellijst.asp">
<input type="hidden" name="act" value="update" />
<input type="hidden" name="artNr" value="***regel values***)" />
</form>
I'm using a bit XSL. Can someone please help me?
after the each loop you should write :
$("input[name='artNr']").val(regel);
精彩评论