<form id="my_form" action="helper.php" method="POST">
<input type="hidden" name="action" value="send" />
</form>$( '#my_form' ).submit();var t = '';
t += '<form id="my_form"....>....</form>';
$( '#body' ).append( t );
$( '#my_form' ).submit(); $( '.navbutton' ).on( 'click', function() {
$.post( '/helpers/page.php', {
page: 'contacts'
}, function( data ) {
$( '.targetdiv' ).html( data );
} );
} ); <head>
<script src="/js/head.js" type="text/javascript" />
</head>head.load(
'https://code.jquery.com/jquery-2.2.2.min.js',
'/js/script1.js',
'/js/script2.js'
);
head.ready( function() {
// скрипты загружены, можно работать
} ); <a href="#" class="but">goto</a>$('.but').on('click', function() {
// так
$('body').scrollTo('#target');
// или так
$('#content').scrollTo(500);
// или так
$('body').scrollTo('#post-5',{duration:'slow', offsetTop : '50'});
} );$("#my_select :first").val();$("#my_select :first").attr('selected', 'true'); var prefix = 'my_app_unique_prefix';
var setItem = function( item, value ) {
window.localStorage.setItem( prefix + item, value );
};
var getItem = function( item ) {
return window.localStorage.getItem( prefix + item );
};
setItem( 'testvalue', 'blablabla' );
console.log( getItem( 'testvalue' ) );