DOM:
代码如下:
function DisplayTextBoxValue(){
var element = document.getElementById('textbox');
// set the attribute on the DOM Element by hand - will update the innerHTML
element.setAttribute('value', element.value);
alert(document.getElementById("container").innerHTML);
return false;
}
jQuery plugin that makes .formhtml() automatically do this:
代码如下:
(function($) {
var oldHTML = $.fn.html;
$.fn.formhtml = function() {
if (arguments.length) return oldHTML.apply(this,argume...
[ 查看全文 ]