💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
``` <body> <input type="text" id="txt"> <p id="show"></p> <script> var obj = {} Object.defineProperty(obj, 'txt', { get: function() { return obj }, set: function(newValue) { document.getElementById('txt').value = newValue document.getElementById('show').innerHTML = newValue } }) document.addEventListener('keyup', function(e) { obj.txt = e.target.value }) console.log(obj) </script> </body> ```